fork download
  1. program SumaFor;
  2. var
  3. m, n, i, suma: Integer;
  4. begin
  5. n := 5;
  6. m := 15;
  7. //readln(n,m);
  8. suma := 0;
  9. for i := n to m do
  10. begin
  11. suma := suma + i;
  12. Writeln(i,' : ', suma);
  13. end;
  14. WriteLn('Suma (FOR): ', suma);
  15. end.
Success #stdin #stdout 0s 5276KB
stdin
1 30
stdout
5  : 5
6  : 11
7  : 18
8  : 26
9  : 35
10  : 45
11  : 56
12  : 68
13  : 81
14  : 95
15  : 110
Suma (FOR): 110