Advertisement
paulogp

Numeros em triangulo (v. 1.0.0)

Aug 7th, 2011
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.51 KB | None | 0 0
  1. { paulogp }
  2. { mac os 7 }
  3. program Ada06p;
  4.  
  5. uses
  6.     MemTypes, QuickDraw, OSIntf;  
  7.  
  8. var
  9.     n, i, j: integer;
  10.     fim: string;
  11.  
  12. begin
  13.     repeat
  14.         clearscreen;
  15.         writeln('Programa: Colocação de número em triângulo.');
  16.         writeln;
  17.         write('Introduza o valor de N: ');
  18.         readln(n);
  19.         j:= 0;
  20.         writeln;
  21.         for i:= 1 to n do
  22.         begin
  23.             for j:= 1 to i do write('*');
  24.             writeln;
  25.         end;
  26.         writeln;
  27.         writeln;
  28.         write('Repetir programa (S/N): ');
  29.         readln(fim);
  30.         uprstring(fim, true);
  31.     until fim = 'N';
  32. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement