fork(3) download
  1. program ideone;
  2. var y,x,r,w:Integer;
  3. const sign:array[Boolean] of Char = (' ','*');
  4. begin
  5. Write('Ile wierszy? ');
  6. ReadLn(w);
  7. WriteLn;
  8. for r:=w-1 to w do
  9. begin
  10. for y:=0 to r-1 do
  11. begin
  12. for x:=1+y-w to 2*y do Write(sign[x>=0]);
  13. WriteLn;
  14. end;
  15. end;
  16. end.
Success #stdin #stdout 0s 280KB
stdin
5
stdout
Ile wierszy? 
    *
   ***
  *****
 *******
    *
   ***
  *****
 *******
*********