#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c,d,e;
cout<<“a = “;
cin>>a;
cout<<“b = “;
cin>>b;
cout<<“c = “;
cin>>c;
d=a>b?(a>c?a:c):(b>c?b:c);
e=a<b?(a<c?a:c):(b<c?b:c);
cout<<“Largest no. is = “<<d;
cout<<“Smallest no. is = “<<e;
getch();
}
#include<conio.h>
void main()
{
clrscr();
int a,b,c,d,e;
cout<<“a = “;
cin>>a;
cout<<“b = “;
cin>>b;
cout<<“c = “;
cin>>c;
d=a>b?(a>c?a:c):(b>c?b:c);
e=a<b?(a<c?a:c):(b<c?b:c);
cout<<“Largest no. is = “<<d;
cout<<“Smallest no. is = “<<e;
getch();
}
No comments:
Post a Comment