Demo: Assign a new value
Correct the waiting count
Seven lamps are waiting at intake. Two owners pick theirs up, so the queue board needs a new number.
int pending = 7; creates the count. Later, pending = pending - 2; reads that count, subtracts two, and stores the result back in pending. The equals sign assigns a value; it is not claiming that the two sides are mathematically equal.
c
#include <stdio.h>
int main(void) {
int pending = 7;
pending = pending - 2;
printf("Lamps waiting: %d\n", pending);
return 0;
}
The board should say five lamps are waiting. If you start with eight instead, the same subtraction leaves six; put the starting count back to seven afterward.