2. If a computer executes the following program: (1) initial value $x=3, S=0$
(2) $x=x+2$
(3) $S=S+x$
(4) If $S \geqslant 10000$, then proceed to (5); otherwise continue from (2)
(5) print $x$
(6) stop, then the value printed by statement (5) is
A. 19
B. 21
C. 23
D. 201
2. $\mathrm{D}$ Hint: When $n=1,2, \cdots$, $x=3+2 n, S=3 \cdot n+\frac{n(n+1)}{2} \cdot 2 \geqslant 10000, n=99$.