Write a program to find maximum of two numbers.
Procedure:
- Enter two numbers n1,n2
- If n1>n2, print n1
- else print n2
#include<iostream>
using namespace std;
int main(){
int n1,n2;
cout<<"Enter two numbers : "<<endl;
cout<<"n1 : ";
cin>>n1;
cout<<"n2 : ";
cin>>n2;
if(n1>n2){
cout<<n1<<" is greater";
}
else{
cout<<n2<<" is greater";
}
return 0;
}
