News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

Program to enter three integers and output the biggest integer using IF

Started by aruljothi, Jun 11, 2009, 04:25 PM

Previous topic - Next topic

aruljothi

#include <iostream.h>
#include <conio.h>
int main()
{
clrscr();
int x,y,z,biggest;
cout << "Enter 3 integers : ";
cin>>x>>y>>z;
biggest=x;
if(y>biggest)
biggest=y;
if(z>biggest)
biggest=z;
cout << "The biggest integer out of the 3 integers you typed ";
cout << x << ", " << y << " & " << z << " is : " << "\n" << biggest << "\n";
getch();
return 0;
}