1. Bài tập 1 - Sau khi thực hiện đoạn chương trình sau, giá trị của biến j bằng bao nhiêu? J:= 0; For i:= 1 to 5 do J:= j + 2; 2. Bài tập 2 - Các câu lệnh Pascal sau có hợp lệ không? Vì sao? a) For i:= 100 to 1 do Writeln(‘A’); b) For i:= 1.5 to 10.5 do Writeln(‘A’); c) For i:= 1 to 10 do Writeln(‘A’); d) For i:= 1 to 10 do; Writeln(‘A’); 3. Bài tập 3 - Viết chương trình in ra màn hình Bảng cửu chương 2. Chỉ giúp mình đi ạ mình cần gấp Xin lỗi các bạn mình hết điểm r ạ nên phải dồn chung 3 bài mong các bạn thông cảm và giải bài giúp mình ạ

1 câu trả lời

1. Bài tập 1 - Sau khi thực hiện đoạn chương trình sau, giá trị của biến j bằng bao nhiêu?

J:= 0;

For i:= 1 to 5 do

J:= j + 2;

Ta có 6 vòng lặp từ i = 0 tới i = 5 

Ta có tổng cấp số cộng có công bội d = 2 

i = 0 ta có j = 2

i = 1 ta có j = 4

i = 2 ta có j = 6

i = 3 ta có j = 8

i = 4 ta có j = 10

i = 5 ta có j = 12

Vậy sau khi thực hiện vòng lặp j = 12

3. Bài tập 3 - Viết chương trình in ra màn hình Bảng cửu chương 2.

Program Tinh tong; 

Uses crt;

Var i: byte; 

Begin

    Clrscr;

    Writeln('Bang cuu chuong hai') ;

    For i := 1 to 10 do writeln('2 × ', i,' = ', 2*i);

    Readln

End.

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

9 lượt xem
1 đáp án
12 giờ trước