fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5.  
  6. int main() {
  7.  
  8. int i_trace_start = 0;
  9. int i_trace_end = 10;
  10. int j = -1;
  11. int step = (i_trace_end > i_trace_start) ? 1 : -1;
  12. for (int i_trace = i_trace_start; i_trace != i_trace_end; i_trace = i_trace + step, j++) {
  13. cout << i_trace << " " << j << endl;
  14.  
  15. }
  16.  
  17. // your code goes here
  18. return 0;
  19. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
0  -1
1  0
2  1
3  2
4  3
5  4
6  5
7  6
8  7
9  8