#include <stdio.h>
#include <conio.h>
#include <iostream.h>
void main()
{
int n1, n2 ,n3;
gotoxy(23,17);cout<<"****************************";
for(int i=18;i<=20;i++)
{gotoxy(23,i);cout<<"*";
gotoxy(50,i);cout<<"*";}
gotoxy(23,20);cout<<"****************************";
gotoxy(10,1);cout<<"******************************************************************";
gotoxy(10,5);cout<<"******************************************************************";
for(int i=2;i<=4;i++)
{gotoxy(10,i);cout<<"*";
gotoxy(75,i);cout<<"*";}
gotoxy(12,2);cout<<"DETERMINE
CUAL DE LOS TRES NUMEROS INGRESADOS ES MAYOR Y MENOR ";
gotoxy(32,3);cout<<"...LENIN
ZAPATA....";
gotoxy(13,10);cout<<">
Ingrese primer numero : "; cin>> n1;
gotoxy(13,11);cout<<">
Ingrese segundo numero: "; cin>> n2;
gotoxy(13,12);cout<<">
Ingrese tercer numero: ";
cin>> n3;
if((n1 > n2) && (n1 > n3))
{ gotoxy(25,18);cout<<"El numero
mayor es: " << n1; }
else
{
if((n2 > n1 )&& (n2 > n3))
{gotoxy(25,18);cout<<"El numero mayor es: "
<< n2;}
else
{gotoxy(25,18);cout<<"El numero
mayor es: " << n3; }
}
if((n1 < n2 ) && (n1 < n3))
{gotoxy(25,19);cout<<"El numero
menor es: " << n1;}
else
{
if((n2 < n1 ) && (n2 < n3))
{gotoxy(25,19);cout<<"El numero menor es: "
<< n2; }
else
{gotoxy(25,19);cout<<"El
numero menor es: " << n3;}
}
_getch();
}
No hay comentarios:
Publicar un comentario