50+ câu Trắc nghiệm Nhập môn lập trình có đáp án - Phần 2

Kết quả: int sum = 0, score; scanf("%d", &score); while (score != -1) { sum += score; scanf("%d", &score); } Nhập: 5, 3, 2, -1

10/21

Kết quả:

int sum = 0, score;

scanf("%d", &score);

while (score != -1)

{

sum += score;

scanf("%d", &score);

}

Nhập: 5, 3, 2, -1

10

1

2

9

Giải thích

Chọn đáp án A