A stored value can change while the program runs. Suppose a delivery changes the number of trays available:
#include <iostream>
int main() {
int trays = 3;
trays = 7;
std::cout << "Trays: " << trays << "\n";
return 0;
}
The declaration int trays = 3; creates the variable and gives it its first value. The later statement trays = 7; assigns a replacement value to that same variable. It does not create another variable, so it does not repeat int.
By the time the output statement runs, trays holds 7. The old value is no longer the current value. Assignment is an instruction to store something, not a mathematical claim that the old and new values are equal.
Order matters. A print placed before the assignment would see the earlier value; a print after it sees the new one. The assignment does not travel backward and alter output that has already been written.
In the starter, the room initially has 12 chairs. A later update needs to record that the available count is now 20. Add the assignment at the marked position, before the supplied output. Do not change the original declaration: keeping both lines makes the change over time visible in the source.
Keep the name chairs on the left of your assignment and put the new count on the right. Leave out int: the declaration above has already created this variable. In the next section, the right-hand side can become a calculation rather than a single replacement number.
20 to the existing chairs variable at the comment. The supplied output should become Available chairs: 20.Edit main.cpp, press Run to inspect the Console, then Submit to check these results.