Programs that make your work easy
All c and C++ programs on all topics are here.
Wednesday, 21 September 2016
To chek the greatest number
Greatest of 3 numbers
#include < iostream.h >
void main()
{
int a,b,c;
cout<<"enter any three numbers:\n";
cin>>a>>b>>c;
if(a>b&&a>c)
cout<<"greatest number is:"<<a;
else if(b>c)
cout<<"greatest number is:"<<b;
else
cout<<"greatest number is:"<<c;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment