Sunday 21 December 2014

Greatest number of three input numbers

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c;
cout<<"Enter three number";
cin>>a>>b>>c;
if(a>b && a>c)
{
cout<<endl<<a;
}
else if(b>c && b>a)
{
cout<<endl<<b;
}
else
{
cout<<endl<<c;
}
getch();
}

No comments:

Post a Comment