PROGRAM ON FINDING LARGEST OF THREE NUMBER

#include<iostream.h>
#include<conio.h>
void main()
{ int x,y,z,max;
  clrscr();
  cout<<"Enter three no.:";
  cin>>x>>y>>z;
  max=x;
  if(y>max)
    max=y;
  if(z>max)
    max=z;
  cout<<"\n"<<"The largest of"<<x<<"\t";
  cout<<y<<" and "<<z<<" is "<<max;
  getch();
}

Comments

Popular Posts