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
What are static variables?
Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be
What is else if syntax?
Can non-public members of another instance of the class be retrieved by the method of the same class?
Explain the isa and hasa class relationships. How would you implement each?
What is the full form of stl in c++?
Explain all the C++ concepts using examples.
Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .
What are the advantages of pointers?
Which ide is best for c++?
What is the difference between procedural programming and oops?
What are the types of container classes?
What is the full form of dos?
What is byval and byref? What are differences between them?
What does std mean in c++?