Write a program to read two numbers from the keyboard and display the larger value on the screen
Answer Posted / hr
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
float a,b;
cout<<" Enter two values :"<<endl;
cin>>a>>b;
if(a>b)
cout<<" larger value = "<<a<<endl;
else
cout<<" larger value = "<<b<<endl;
return 0;
}
OUTPUT:
Enter two values:10 20
Larger value:20
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can circle be called an ellipse?
What is the role of C++ shorthand's?
What is the full name of logo?
Explain virtual class?
What is a float in c++?
Templates mean
Write about the retrieval of n number of objects during the process of delete[]p?
What is the basic concept of c++?
What is private, public and protected inheritance?
What are shallow and deep copy?
What is the difference between realloc() and free() in C++?
What does std :: flush do?
What are the advantage of using register variables?
write a porgram in c++ that reads an integer and print the biggest digit in the number
How long it will take to learn c++?