FIND THE GREATEST OF THREE NUMBERS
FIND THE GREATEST OF THREE NUMBERS
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c;
cout<<"enter the
three numbers";
cin>>a>>b>>c;
IT Park @ Campus
if(a>b && a>c)
cout<<a<<"is
greatest";
else if
(b>a&&b>c)
cout<<b<<"is
greatest";
else
cout<<c<<"is
greatest";
getch();
}
OUTPUT:
Enter three numbers.
3
4
6
6 is greatest.
No comments: