Program Buuuuummmm;
Uses WinCrt;
Var i,op:integer;
Begin
Writeln('****Menú****');
Writeln('');
Writeln('Pulse 1 para número pares Ascendente');
Writeln('Pulse 2 para número impares Ascendentes');
Writeln('Pulse 3 para número primos Ascendentes');
Writeln('Pulse 4 para número pares Descendentes');
Writeln('Pulse 5 para número impares Descendentes');
Writeln('Pulse 6 para número primos Descentes');
Readln(op);
If op= 1 then
Begin
ClrScr;
Writeln('Número Pares Ascendente');
For i:= 1 TO 10 DO
If (i mod 2)=0 then
Writeln(i);
End;
If op= 2 then
Begin
ClrScr;
Writeln('Número impares Ascendente');
FOR i:=1 TO 10 DO
IF (i mod 2)= 1 then
Writeln(i);
End;
If op= 3 then
Begin
ClrScr;
Writeln('Número primos Ascendente');
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('Número pares Descendente');
FOR i:=10 DOWNTO 1 DO
IF (i mod 2)=0 then
Writeln(i);
End;
If op= 5 then
Begin
ClrScr;
Writeln('Número impares Descendente');
FOR i:=10 DOWNTO 1 DO
IF (i mod 2)=1 then
Writeln(i);
End;
IF op= 6 then
Begin
ClrScr;
Writeln('Número primos Descendente');
FOR i:=10 DOWNTO 1 DO
IF (i mod 2)=1)and (1<>9)or (i =2)THEN
Writeln (i);;
End;
END.
No hay comentarios:
Publicar un comentario