Write a program to read two numbers from the keyboard and display the larger value on the screen
#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 |
Tell us the size of a float variable.
Write a C++ Program to Find whether given Number is Odd or Even.
What is a virtual base class?
How can you force the compiler to not generate them?
Is there a difference between class and struct?
What is the difference between Stack and Queue in C++?
0 Answers Global Logic, iNautix,
When must you use a constructor initializer list?
What does it mean to declare a member function as static in C++?
Tell How To Check Whether A Linked List Is Circular ?
C++ supports multiple inheritance. What is the “diamond problem” that can occur with multiple inheritance? Give an example.
What is pass by value & reference.
What is name mangling/name decoration?