Write a program in c++ to find the greatest number in two numbers with the help of if - else condition
#include<iostream>
using namespace std;
int main()
{
int a,b;
cout<<"Enter the first number";
cin>>a;
cout<<"Enter the second number";
cin>>b;
if(a>b)
cout<<"Greatest number : "<<a;
else
cout<<"Greatest number : "<<b;
return 0;
}
Output