1. Sau khi thực hiện đoạn chương trình sau, giá trị của biến j và k bằng bao nhiêu? Đoạn chương trình 1: j:=2; k:=3; for i:=1 to 5 do j:=j+1; k:= k+j; Đoạn chương trình 2: j:=4; k:=0; for i:=0 to 3 do begin j:=j+1; k:= k+j; end; Đoạn chương trình 3: j:=1; k:=3; for i:=1 to 5 do if i mod 2 = 0 then j:=j+1; k:= k+j; 2. Viết chương trình để nhập tên và hiển thị ra màn hình lời chào các bạn trong lớp (30 HS). 3. Viết chương trình in ra màn hình bảng nhân của một số từ 1 đến 9, số được nhập từ bàn phím và dừng màn hình để có thể quan sát kết quả Help:<cần gấp Hứa vote 5* và cảm ơn + TLHN ( không sao chép mạng ) tks

1 câu trả lời

1.
Chương trình 1
j=7, k=10
Chương trình 2
j=8, k=26
Chương trình 3
j=3, k=6
2. (bài 2 mình không biết là phải nhập xong hết rồi mới in ra hay nhập 1 tên là in ra luôn nên mình làm cái nhập và in ra luôn)
program ct2;
uses crt;
var i,n:byte;
s:string;
begin
 clrscr;
 write('nhap so hoc sinh='); readln(n);
 for i:=1 to n do
 begin
  write('ten hoc sinh: '); readln(s);
  writeln('xin chao ',s);
 end;
 readln;
end.
3.
program ct3;
uses crt;
var n:integer;
i:byte;
begin
 clrscr;
 write('nhap mot so=') readln(n);
 writeln('------------------------------');
 for i:=1 to 9 do writeln(n,'x',i,'=',i*n);
 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

0 lượt xem
1 đáp án
32 phút trước