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 ? | 1 Yes | 0 No |
Post New Answer View All Answers
When should overload new operator on a global basis or a class basis?
What is c++ and its uses?
What is the return value of the insertion operator?
Explain the extern storage classes in c++.
What is #include iostream in c++?
Do we have to use initialization list in spite of the assignment in constructors?
Can c++ be faster than c?
Why are pointers not used in c++?
What is the best it certification?
What are the two shift operators and what are their functions?
Is vector a class in c++?
What are string library functions(syntax).
Explain virtual class and friend class.
What is ostream in c++?
What is the full form of india?