/* Remedial 1. for (int i {0}; i < 10; ++i) { cout << i << "\n"; } Ans: It iterates 10 times. The first value of i is 0. The second value of i is 1. The last value of i is 9. 0 1 2 3 4 5 6 7 8 9 2. for (int i{0}; i < 10; ++i) { cout << i << "\n\n"; } Ans" 0 1 2 3 4 5 6 7 8 9 10 3. for (int i {0}; i < 10; ++i) { cout << i << " "; } cout <<"\n"; Ans: 0 1 2 3 4 5 6 7 8 9 4. for (int i {0}; i < 10; ++i) { cout << i << "\n"; } Ans: Make i start at 1 instead of 0. for (int i {1}; i < 10; ++i) { cout << i << "\n"; } Make it start at 5 instead of 1 for (int i {5}; i < 10; ++1) { cout << i << "\n"; } 5. What does the following loop output? Why doe it now count up to 10 instead of stoping at 9? for (int i {0}; i <= 10; ++i) { cout << 1 << "\n"; } Ans: 0 1 2 3 4 5 6 7 8 9 10 It now counts up to 10 because of the "<=", so now i also equals 10. 6. Make a loop that put integers from 10 to 20 inclusive, in increasing order, one after another on the same line, separated by spaces. for (int i {10} i <= 20; ++i){ cout << i << " "; } 7. What does the following loop output? What does += do? for (int i {10}; i <= 100; i += 10) { cout << i << "\n"; } Ans: 10 20 30 40 50 60 70 80 90 100 += 10 increase increases the integer by 10, adding 10 to the previous iterate each time until it reaches 100. 8. Write a loop that outputs 2 4 6 8 for (int i {2}; i <= 8; i += 2) { cout << i << "\n"; } 9. What does the following loop output? Why does it count down? Why does it stop at 0? for( int i {10}; i >= 0; --i) { cout << i << "\n"; }