JavaScript is required

Kết quả của chương trình sau

A.

12

B.

10

C.

8

D.

Kết quả khác

Trả lời:

Đáp án đúng: A


The code initializes two integer variables, `a` and `b`, with values 5 and 3 respectively. It then calculates the sum of `a` and `b` and stores it in `c` (c = 8). Next, it updates `a` to `c - a` (a = 8 - 5 = 3) and `b` to `c - b` (b = 8 - 3 = 5). Finally, it outputs the sum of the updated `a` and `b` (3 + 5 = 8). Thus, the program outputs 8.

Câu hỏi liên quan