fork download
  1. #include <iostream>
  2. #include <limits>
  3. using namespace std;
  4.  
  5. int main() {
  6. volatile int index = numeric_limits<int>::max();
  7. for (int i = 0; i < 10; ++i)
  8. {
  9. cout << index << ": " << index++ % 16 << endl;
  10. }
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5312KB
stdin
Standard input is empty
stdout
2147483647: 15
-2147483648: 0
-2147483647: -15
-2147483646: -14
-2147483645: -13
-2147483644: -12
-2147483643: -11
-2147483642: -10
-2147483641: -9
-2147483640: -8