fork(2) download
  1. program SumaFor;
  2. var
  3. m, n, i, suma: Integer;
  4. begin
  5. Write('Podaj m: ');
  6. ReadLn(m);
  7. Write('Podaj n: ');
  8. ReadLn(n);
  9.  
  10. suma := 0;
  11. for i := m to n do
  12. suma := suma + i;
  13.  
  14. WriteLn('Suma (FOR): ', suma);
  15. end.
Success #stdin #stdout 0s 5280KB
stdin
4
6
stdout
Podaj m: Podaj n: Suma (WHILE): 15