Câu lệnh for và while đều có công dụng lặp lại các lệnh khác, có thể sử dụng thay thế cho nhau * A.Đúng B.Sai Đoạn lệnh sau : For i := 3 to 10 do begin write('a'); end ; sẽ viết ra bao nhiêu chữ a ? * A.10 B.9 C.8 D.7 Giá trị của biến t là bao nhiêu sau khi thực hiện đoạn lệnh sau : t := 5 ; i := 5 ; while i < 10 do begin t := t +2*i ; i := i + 1 ; end ; * A.98 B.100 C.75 D.Giá trị khác Đoạn lệnh sau sẽ viết ra số nào ? a := 15 ; i := 2 ; while (a mod i <> 0) do begin i := i + 1 ;end ; write ( i) ; A.2 B.3 C.4 D.5 Lệnh for sau đúng hay sai? for i := 1 to n do begin write(i) ; end; A.Đúng B.Sai Đoạn lệnh sau sẽ viết ra các số nào ? for i := 3 to 10 do begin if (i mod 2 = 0) then write(i) ; end ; A.1 2 3 4 5 6 7 8 9 10 B.3 4 5 6 7 8 9 10 C.4 6 8 D.4 6 8 10 Đoạn lệnh sau sẽ viết ra các số nào ? i := 3 ; while i < 10 do begin if (i mod 2 = 1) then write(i) ; i := i + 1 ; end ; A.3 4 5 6 7 8 9 10 B.3 5 7 9 C.3 5 7 9 10 D.Các số khác Phương án nào dưới đây là khai báo mảng hợp lệ? A.mang : ARRAY[0..10] OF INTEGER; B.mang : ARRAY[0..10] : INTEGER ; C.mang : INTEGER OF ARRAY[0..10]; D.mang : ARRAY(0..10) : INTEGER; Sau khi thực hiện đoạn lệnh sau, giá trị của biến i là bao nhiêu: i:= 2; while i < 8 do begin i:= i + 2 ; end; A.7 B.8 C.10 D.Giá trị khác Đoạn lệnh sau For i:=5 to 10 do begin write(i + 5); end; sẽ cho kết quả là A.5 B.10 C.15 D.Giá trị khác

2 câu trả lời

1.A

2.D

3.A

4.D

5.A

6.C
7.D

8.B

9.A

10.A

Câu lệnh for và while đều có công dụng lặp lại các lệnh khác, có thể sử dụng thay thế cho nhau *

A.Đúng

B.Sai

Hai câu lệnh While và `For` có thể thay thế cho nhau.Mọi câu lệnh `For` đều có thể thay thế bằng While ,nhưng để `For` thay thế cho `While thì phải tùy trường hợp.

Đoạn lệnh sau : For i := 3 to 10 do begin write('a'); end ; sẽ viết ra bao nhiêu chữ a ? *

A.10

B.9

C.8

D.7

Giá trị của biến t là bao nhiêu sau khi thực hiện đoạn lệnh sau : t := 5 ; i := 5 ; while i < 10 do begin t := t +2*i ; i := i + 1 ; end ; *

A.98

B.100

C.75

D.Giá trị khác

Đoạn lệnh sau sẽ viết ra số nào ? a := 15 ; i := 2 ; while (a mod i <> 0) do begin i := i + 1 ;end ; write ( i) ;

A.2

B.3

C.4

D.5

Lệnh for sau đúng hay sai?

for i := 1 to n do

begin

write(i) ;

end;

A.Đúng

B.Sai

Đoạn lệnh sau sẽ viết ra các số nào ?

for i := 3 to 10 do begin if (i mod 2 = 0) then write(i) ; end ;

A.1 2 3 4 5 6 7 8 9 10

B.3 4 5 6 7 8 9 10

C.4 6 8

D.4 6 8 10

Đoạn lệnh sau sẽ viết ra các số nào ?

i := 3 ;

while i < 10 do begin

if (i mod 2 = 1) then write(i) ; i := i + 1 ; end ;

A.3 4 5 6 7 8 9 10

B.3 5 7 9

C.3 5 7 9 10

D.Các số khác

Phương án nào dưới đây là khai báo mảng hợp lệ?

A.mang : ARRAY[0..10] OF INTEGER;

B.mang : ARRAY[0..10] : INTEGER ;

C.mang : INTEGER OF ARRAY[0..10];

D.mang : ARRAY(0..10) : INTEGER;

Sau khi thực hiện đoạn lệnh sau, giá trị của biến i là bao nhiêu: i:= 2; while i < 8 do begin i:= i + 2 ; end;

A.7

B.8

C.10

D.Giá trị khác

Đoạn lệnh sau For i:=5 to 10 do begin write(i + 5); end; sẽ cho kết quả là

A.5

B.10

C.15

D.Giá trị khác

Câu hỏi trong lớp Xem thêm

II. Choose the word or phrase that best completes each unfinished sentence below. 6. Radioactive pollution is increasing the increased use of radioactivity. A. as B. since C. because of D. because 7. Do you think there would be less conflict in the world if all people the same language? A. spoke B. speak C. had spoken D. will speak 8. Unless you all of my questions, I can’t do anything to help you. A. answered B. answer C. would answer D. are answering 9. Singapore is famous for its …………. streets and green trees. A. cleanliness B. cleanly C. cleaning D. clean 10. If someone into the store, smile and say, “May I help you?” A. comes B. came C. come D. should come 11. It was said that the fish died a powerful toxin in the sea water. A. because of B. because C. since D. as a result 12. “Here’s my phone number”. “Thanks. I’ll give you a call if I some help tomorrow” A. will need B. need C. would need D. needed 13. is the festival celebrated? – Every year. A. When B. How often C. How D. What 14. The death rate would decrease if hygienic conditions improved. A. was B. is C. were D. had been 15. On Christmas Eve, most big cities, especially London are _______ with coloured lights across the streets and enormous Christmas trees. A. decorated B. hang C. put D. made 16. If she him, she would be very happy. A. would meet B. will meet C. met D. should meet 17. Nga is a beautiful girl; ______ , she’s kind - hearted. A. therefore B. however C. moreover D. otherwise 18. If I had enough money, I abroad to improve my English. A. will go B. would go C. went D. should have go to 19. She has read interesting book. A. a B. an C. the D. Ø 20. If it convenient, let’s go out for a drink tonight. A. be B. is C. was D. were

10 lượt xem
1 đáp án
22 giờ trước