Friday, 30 September 2016

Wap to find greatest of two numbers using conditional operator.

Wap to find greatest of two numbers using conditional operator.

//Greatest of two numbers using conditional operator.
#include<stdio.h>
#include<conio.h>
void main ( )
{
int a,b,big;
clrscr( );
cout<<"/n Enter two numbers";
cin>>a>>b;
big = (a>b) ? a:b;
cout<<"The greater number ="<<big;
getch( );
}



0 comments: