fork(1) download
  1. program SumaWhile;
  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. i := m;
  12. while i <= n do
  13. begin
  14. suma := suma + i;
  15. i := i + 1;
  16. end;
  17.  
  18. WriteLn('Suma (WHILE): ', suma);
  19. end.
  20.  
Success #stdin #stdout 0s 5280KB
stdin
5
7
stdout
Podaj m: Podaj n: Suma (WHILE): 18