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
What is low level language in simple words?
Prepare me a program for the animation of train
Difference between overloaded functions and overridden functions
Can I learn c++ without c?
What are abstract data types in c++?
What is a rooted hierarchy?
What is Boyce Codd Normal form?
What is data types c++?
What is polymorphism in oop example?
What is conversion constructor in C++
What is the difference between mutex and binary semaphore?
Why it is called runtime polymorphism?
Explain storage qualifiers in c++.
What are files in c++?
What is the difference between malloc, calloc and realloc?