Write a c++ program to read two numbers from the keyboard and display the larger value on the screen
2. Write a simple c++ program to
read two numbers from the keyboard and display the larger value on the screen.
#include<iostream>
using namespace std;
int main()
{
int m,n;
cout<<" Enter the 1st number: ";
cin>>m;
cout<< "Enter the 2nd number: ";
cin>>n;
if(m>n)
cout<< "Larger Value is= "<<m<<endl ;
else
cout<< "Larger Value is= "<<n<<endl ;
}
No comments
Post a Comment