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 |
What are the major differences between C and C++?
What do you by Function Overloading in C++?
0 Answers Akamai Technologies, Infogain,
What is conversion constructor in C++
What does malloc return in C and C++?
Difference between Call by pointer and by reference.
Implement a 2D bit-matrix representing monochrome pixels which will have only OFF/ON values and will take on an average only one bit of memory for each stored bit. How to perform various operations on it?
Declare a pointer to a function that takes a char pointer as argument and returns a void pointer.
Difference between function overloading and function overriding.
Explain the difference between method overriding and method overloading in C++?
What is bool in C++
What is the difference between member functions and static member functions?
How do you work around them?