0

Why does this code only increment or decrement one variable but leave the other alone

#include <iostream> Using namespace std; Int main() { int pos = 100; int neg = 100; for(pos=100; pos>=neg; pos++) for(neg = 100; neg<=pos; neg--) Cout << pos << " " << neg << endl; }

1st Sep 2023, 8:35 PM
Levi James Saunders
Levi James Saunders - avatar
3 Answers