fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. for ( unsigned day = 1, candy = 6; day < 31; ++day, candy += 5 )
  6. std::cout << day << ' ' << candy << '\n' ;
  7. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
1 6
2 11
3 16
4 21
5 26
6 31
7 36
8 41
9 46
10 51
11 56
12 61
13 66
14 71
15 76
16 81
17 86
18 91
19 96
20 101
21 106
22 111
23 116
24 121
25 126
26 131
27 136
28 141
29 146
30 151