fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // input
  6. int n;
  7. cin >> n;
  8.  
  9. // process & output
  10. for (int i = n; i >= -5; i--) {
  11. cout << i << " ";
  12. }
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5308KB
stdin
1 2
stdout
1 0 -1 -2 -3 -4 -5