JavaScript is required

 Cho đoạn chương trìnhsau: /n=input('Nhap gia tri n :') /k=1; /B=0; /C=2; /while k

A.

15

B.

6

C.

2.5

D.

cả ba đều sai

Trả lời:

Đáp án đúng: D


The code calculates the sum of the first n even numbers starting from 2. However, the input format and syntax are incorrect. Assuming the code is corrected and runs correctly, it calculates B = 2 + 4 + 6 + ... + 2n.

Câu hỏi liên quan