Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { paulogp }
- { mac os 7 }
- program Ada12p;
- uses
- MemTypes, QuickDraw, OSIntf;
- const
- MAX = 17;
- var
- i, j, n: integer;
- fim: string;
- begin
- repeat
- clearscreen;
- writeln('Programa: Triângulo de números!');
- writeln('Paulo G.P.');
- writeln('===============================');
- repeat
- writeln;
- write('Introduza um valor no intervalo ]0,', MAX, ']: ');
- readln(n);
- writeln;
- if (n <= 0) or (n > MAX) then write('Atenção!!!');
- until (N > 0) and (N <= MAX);
- write;
- for J:= N downto 1 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