PROGRAM NOMBRE;
USES WINCRT;
VAR i,op:Integer;
BEGIN
Writeln('**Menu***');
Writeln('');
Writeln('Pulse 1 para los Numero Ascendente');
Writeln('Pulse 2 para los Numero Descendente');
Writeln('Pulse 3 para los Numero Pares');
Writeln('Pulse 4 para los Numero Impares');
Readln(op);
If op= 1 then
Begin
Writeln('Numero Ascendente');
FOR i:=1 TO 10 DO
Writeln(i);
End;
If op= 2 then
Begin
Writeln('Numero Pares Descendente');
FOR i:=10 DOWNTO 1 DO
Writeln(i);
End;
If op= 3 then
Begin
Writeln('Numero Pares');
FOR i:=10 DOWNTO 1 DO
IF (i mod 2)=1 then
Writeln(i);
End;
If op= 4 then
Begin
Writeln('Numero Impares');
FOR i:=10 DOWNTO 1 DO
IF ((i mod 2)=1) THEN
Writeln(i);
End;
END.
No hay comentarios:
Publicar un comentario