fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int i = 3;
  8. int u = 0;
  9. int r = 60;
  10.  
  11. auto t = [&]/*()*/{return r - (i * u);};
  12.  
  13. while (t() >= 0)
  14. {
  15. cout << t() << endl << u++ << endl;
  16. }
  17. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
57
0
54
1
51
2
48
3
45
4
42
5
39
6
36
7
33
8
30
9
27
10
24
11
21
12
18
13
15
14
12
15
9
16
6
17
3
18
0
19
-3
20