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 ? | 1 Yes | 0 No |
What do you by Function Overloading in C++?
0 Answers Akamai Technologies, Infogain,
Write a C++ program to print strings in reverse order.
What is bool in C++
What does it mean to declare a member function as virtual in C++?
Can we call a virtual function from a constructor?
Factory Method C++ – How to delete pointers returned by it
In C++ what is the meaning of data hiding?
What is the difference between member functions and static member functions?
Discuss the role of C++ shorthands.
Explain encapsulation in C++.
What is static variable and difference between(const char *p,char const *p,const char* const p).
Define type casting in C++.