//REMEDIAL// 1. This loop outputs: 0 1 2 3 4 5 6 7 8 9 2. Instead of one return character, each loop will output 2 return characters, and look like: 0 1 2 3 4 5 6 7 8 9 3. The output of this new loop would be: 0 1 2 3 4 5 6 7 8 9 4a.To have the loop start at 1 instead of zero: for (int i {1}; i < 10; ++i) { cout << i << "\n"; } 4b. To make the loop start at 5 instead of 1: for (int i {5}; i < 10; ++i) { cout << i << "\n"; } 5. This loop outputs: 0 1 2 3 4 5 6 7 8 9 10 It stops at ten because we've changed < to <=. 6. for (int i {10}; i <= 20; ++i) { cout << i << " " } 7. This loop outputs: 10 20 30 40 50 60 70 80 90 100 The += is asking us to add 10 and assign that new value to the next iteration of the loop. 8. This loop: for (int i {2}; i <= 8; i += 2) { cout << i << "\n"; } outputs: 2 4 6 8 9. This loop outputs: 10 9 8 7 6 5 4 3 2 1 0 It stops at 0 because the condition is: as long as i is greater than or equal to 0, the loop will keep going. The final possible value that makes that expression true is 0, so the loop stops at 0. 10. This loop outputs: 100 90 80 70 60 50 40 30 20 10 0 This loop counts down by tens because i -= 10, which really means i-10 for each iteration of the loop. 11. The loop outputs: 10 11 20 21 30 31 40 41 50 51 60 61 70 71 80 81 90 91 100 101 The second column is 1 greater because the output statement is i+1, which is one greater than i. 12. (with extra credit) #inlcude #include #include using namespace std; int main () { for (int i {0}; i <= 90; i += 10) { cout << setw(3) << i << "\t" << setw(3) << i * 2 } IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2.IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2.IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2.IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2.IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2.IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2.IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2.IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2.IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2.IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2.IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2.IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2.IF STATEMENTS 1. for (int i {0}; i <= 9; ++i) { if (i%2==0) { cout << i << " is even.\n"; } else { cout << i << " is odd.\n"; 2. for (int i {2000}; i <= 2028; ++i) { if (i%4==0) { cout << i << " is a presidential election year.\n"; } else if (i%4==2) { cout << i << " is a midterm election year.\n"; } else { cout << i << " is a local election year. \n"; } } 3. if (year < currentYear) { cout << year " was a good year.\n"; } else if (year == currentYear) { cout << year << " is a good year.\n"; } else if (year > currentYear) { cout << year << " will be a good year.\n"; } 4. Yes, they will be identical in their outputs.