Friday, February 13, 2015

C Program to find Greatest number among three numbers

#include<iostream.h>
#include<conio.h>

void main()
{
int x,y,z,max;
clrscr();
cout<<"Enter The Three Numbers ";
cin>>x>>y>>z;

max=x;
if (y>max)
max=y;
if (z>max)
max=z;

cout<<"
"<<"The Greatest Number among "<<x<<" "<<y<<" "<<z<<" is "<<max;

getch();
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.