#include <stdio.h>
#include <conio.h>
#include <iostream.h>
void main()
{
int n1
, n2 , n3 ,n4 ,n5 ;
gotoxy(19,3);cout<<"INSTITUTO
TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(30,4);cout<<"...LENIN
ZAPATA...";
gotoxy(18,5);cout<<"IMPRIME
EL NUMERO MAYOR";
gotoxy(6,7);cout<<"\1
INGRESE 5 NUMEROS: ";
gotoxy(5,9);cin>> n1;
gotoxy(5,10);cin>> n2;
gotoxy(5,11);cin>> n3;
gotoxy(5,12);cin>> n4;
gotoxy(5,13);cin>> n5;
if(n1 >n2 )
{
if(n1 > n3)
{if(n1 > n4)
{
if(n1 > n5)
{gotoxy(24,20),cout<<"El
numero mayor es: " << n1 ;}
else
{gotoxy(35,12);cout<<"El
mayor es: " << n5;}
}
else
{ if(n4 > n5)
{gotoxy(35,12);cout<<"el
mayor es : " << n4;}
else
{gotoxy(35,12);cout<<"el
mayor es : " << n5;}
}
}else
{
if( n3 > n4 )
{
if (n3 > n5)
{gotoxy(35,12);cout<<"el
mayor es : " << n3;}
else
{gotoxy(35,12);cout<<"
el mayor es: " << n5;}
}
else
{
if(n4 > n5)
{gotoxy(35,12);cout<<"
el mayor es:" << n4;}
else
{gotoxy(35,12);cout<<"el
mayor es:" << n5;
}
}
}
}
else
if(n2 > n3)
{
if(n2 > n4)
{
if(n2 > n5)
{gotoxy(35,12);cout<<"
el mayor es:" << n2;}
else
{gotoxy(35,12);cout<<"
el mayor es: " <<n5; }
}
else
{
if( n4 > n5)
{gotoxy(35,12);cout<<"el
mayor es :" << n4; }
else
{gotoxy(35,12);cout<<"
el mayor es: " << n5 ; }
}
} else
{
if(n3 > n4)
{
if(n3 > n5)
{
gotoxy(35,12);cout<<"el mayor es : " << n3; }
else
{gotoxy(35,12);cout<<"el
mayor es: " << n5; }
}else
if(n4 > n5)
{gotoxy(35,12);cout<<
"mayor es : " << n4;
}
else
{gotoxy(35,12);cout<<"
mayor es : " << n5 ; }
}
}
}
gotoxy(35,10);cout<<"RESULTADO:";
getch();
}
No hay comentarios:
Publicar un comentario