Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { paulogp }
- { mac os 7 }
- program Ada13p;
- uses
- MemTypes, QuickDraw, OSIntf;
- const
- MAX = 18;
- var
- i, j, n: integer;
- fim: string;
- begin
- repeat
- clearscreen;
- writeln('Programa: Triângulo de números invertidos!');
- 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);
- writeln;
- for J:= n downto 1 do
- begin
- for i:= 1 to n do
- if i >= n - J + 1 then write(i: 4) else write(' ');
- 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