Cuales el Mayor Mediano menor
Publicado por Misael (41 intervenciones) el 13/03/2015 21:07:50

Valora esta pregunta


0
{Es tu Programa compara tus fallos}
uses
crt;
var
temp, x, y, z : integer;
begin
clrscr;
write(' Entre 3 numeros : ');
readln(x,y,z);
clrscr;
if (x > z) and (x > y) then
begin
writeln(' El Mayor Es X = ',x);
if z > y then
begin
writeln(' El Mediano Es Z = ',z,' El Menor Es Y = ',y);
end
else
begin
writeln(' El Medio Es Y = ',y,' El Menor Es Z = ',z );
end;
end
else
if (z > x) and (z > y) then
begin
writeln(' El Mayor Es Z = ',z);
if y > x then
begin
writeln(' El Mediano Es Y = ',y,' El Menor Es X = ',x);
end
else
begin
writeln(' El Mediano Es X = ',x,' El Menor Es Y = ',y);
end;
end
else
if (y > x) and (y > z) then
begin
writeln(' El Mayor Es Y = ',y);
if x > z then
begin
writeln(' El Mediano Es X = ',x,' El Menor Es Z = ',z);
end
else
writeln(' El Mediano Es Z = ',z,' El Menor Es X = ',x);
end;
readkey;
end.