fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. double val = 10;
  7. double add = 8;
  8. for (double i = 1; i < 11; i++)
  9. {
  10. cout << i << " " << val << endl;
  11. val += add;
  12. add += i/6;
  13. }
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
1 10
2 18
3 26.1667
4 34.6667
5 43.6667
6 53.3333
7 63.8333
8 75.3333
9 88
10 102