Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { paulogp }
- { mac os 7 }
- program Ada11p;
- uses
- MemTypes, QuickDraw, OSIntf;
- var
- i, j, n: integer;
- fim: string;
- begin
- repeat
- clearscreen;
- writeln('Programa: Escreve números em triângulo!');
- writeln('Paulo G.P.');
- writeln('=======================================');
- 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 j:= 1 to n do
- begin
- for i:= 1 to n do
- if i <= n - j + 1 then write(' ', i);
- writeln;
- end;
- writeln;
- 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