Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { paulogp }
- { mac os 7 }
- program Ada07p;
- uses
- MemTypes, QuickDraw, OSIntf;
- var
- i, n: integer;
- fim: string;
- begin
- repeat
- clearscreen;
- writeln('Programa: Escreve números em ambas as direcções!');
- repeat
- writeln;
- write('Introduza um valor no intervalo ]0,20]: ');
- readln(n);
- writeln;
- if (n<=0) or (n>20) then Write('Atenção!!!');
- until (n > 0) and (n <= 20);
- writeln;
- for i:= 0 to n do write(I,', ');
- writeln;
- for i:= n downto 0 do write(I,', ');
- writeln;
- writeln;
- write('Repetir programa (S/N): ');
- readln(fim);
- uprstring(fim, true);
- until fim = 'N';
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement