Ads Top

CONDITIONAL OPERATOR PROGRAM USING C

 CONDITIONAL OPERATOR PROGRAM USING C


#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
cout<<"Enter two numbers";
cin>>a>>b;
c=(a>b)?a:b;
cout<<"GREATEST VALUE IS"<<c;
while(a<=10)

getch();
}

OUTPUT:

Enter two numbers:
5
6
Greatest value is 6.

No comments:

Touchfeeds. Powered by Blogger.