PROGRAM lol;
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.
Impares - Pares - Primos Con For
radioepica
●
jueves, 19 de julio de 2012
Suscribirse a:
Enviar comentarios (Atom)
Pesquisar este blog
music
Sonando:
Suscribete a mi canal
Segundo Canal
Get your own Digital Clock
Dale like
Marcadores
- C++ (1)
- Notas curiosas (2)
- Pascal (28)
- Radio en ACCPLUS V2 (3)
0 comentarios:
Publicar un comentario