PROGRAM BUUUUUU;
USES WINCRT;
VAR i,op:Integer;
BEGIN
Writeln('**Menu***');
Writeln('');
Writeln('Pulse 1 para los Numero Pares Ascendente');
Writeln('Pulse 2 para los Numero Impares Ascendente');
Writeln('Pulse 3 para los Numero Primos Ascendente');
Writeln('Pulse 4 para los Numero Pares Descendente');
Writeln('Pulse 5 para los Numero Impares Descendente');
Writeln('Pulse 6 para los Numero Primos Descendente');
Readln(op);
If op= 1 then
Begin
ClrScr;
{LES REGALE 5PTS}
Writeln('Numero Pares Ascendente');
FOR i:=1 TO 10 DO
IF (i mod 2)=0 then
Writeln(i);
End;
If op= 2 then
Begin
ClrScr;
{OK YA AQUI LLEVAN 10PTS}
Writeln('Numero Impares Ascendente');
FOR i:=1 TO 10 DO
IF (i mod 2)=1 then
Writeln(i);
End;
If op= 3 then
Begin
ClrScr;
Writeln('Numero Primos Ascendente');
{EXTREMADAMENTE SENCILLO}
FOR i:=1 TO 10 DO
IF ((i mod 2)=1) and (i<>9) or (i=2) THEN
Writeln(i);;
End;
If op= 4 then
Begin
ClrScr;
Writeln('Numero Pares Descendente');
{NUEVO}
FOR i:=10 DOWNTO 1 DO
IF (i mod 2)=0 then
Writeln(i);
End;
If op= 5 then
Begin
ClrScr;
Writeln('Numero Impares Descendente');
{NUEVO}
FOR i:=10 DOWNTO 1 DO
IF (i mod 2)=1 then
Writeln(i);
End;
If op= 6 then
Begin
ClrScr;
Writeln('Numero Primos Descendente');
{NUEVO}
FOR i:=10 DOWNTO 1 DO
IF ((i mod 2)=1) and (i<>9) or (i=2) THEN
Writeln(i);;
End;
END.
{Filmado, Dirijido y Producido por NochesDigitales}
2 Comentarios
Mmm, Damelys y yo lo hicimos pero algo distinto, pero es la misma idea! LOL Gracias Profe!
ResponderEliminarGracias profe voy a hacerlo para ver si me corre... profe quiero sacar 60....
ResponderEliminar