Answer:
1. Option A: for loop is correct
2. Option B: while loop is correct
Explanation:
Two loops are used commonly. For and while
For is used when the number of iterations are already known and while is used when number of iterations is not known and the loop has to be terminated based on any condition.
<u>1. You are finding the batting average of 13 baseball players.
</u>
For loop will be used as the number of iterations is already known. The score of 13 players has to be used to calculate the average so there will be 13 iterations. Hence, for loop will be used.
<u>2. You are asking your users for the names of all the stores where they shopped to find their friend's birthday present. They will show they are done by entering the word "done."</u>
While loop will be used as the termination of loop depends on the input given by the user so the number of iterations are not already known.
Hence,
1. Option A: for loop is correct
2. Option B: while loop is correct
Answer:
- int birthMonth, birthYear;
-
- cin >> birthMonth;
- cin >> birthYear;
-
- cout << birthMonth << "/" << birthYear;
Explanation:
Firstly, we declare two integer type variables, <em>birthMonth</em> and <em>birthYear </em>(Line 1). Next, we use cin as the standard input stream to get the birth month and year from user (Line 3 - 4). Finally, we print the date using cout. We can chain the << operator to create a date string with format birthMonth/birthYear as expected by question (Line 6)
R₂ and R₃ can be replaced by:

The total R of the circuit is R₁+R₅+R₄ = 706 2/3
So the current in the circuit I=V/R is 100/(706 2/3) = 15/106 A
(I'm deliberately not trying to round the result)
The voltage drop over R₄ is V=I*R = 15/106 * 500 ≈ 70
So answer C would be my choice.
C - Puts a list of items into order
Answer:
The correct answer is "circuit-level gateway"
Explanation:
A circuit-level gateway is a type of firewall that works at the session layer between the transport and application layer.