
Practice_Conditional_Statement
Presentation
•
Computers
•
11th Grade
•
Hard
Pham Hoa
Used 3+ times
FREE Resource
7 Slides • 0 Questions
1
Thực hành:
Lập trình với câu lệnh điều kiện
Tin học 11 - Lập trình với ngôn ngữ Pascal
2
Cú pháp lệnh điều kiện
Dạng thiếu
if <điều kiện> then <câu lệnh>;
Dạng đủ
if <điều kiện> then <câu lệnh>
else <câu lệnh>;
3
Bài tập 1:
Nhập chương trình sau vào Turbo Pascal. Biên dịch và chạy.
program TH;
uses crt;
var n:integer;
begin
write('Nhap vao n: ');
readln(n);
if n mod 2 = 0 then write('chan')
else write('le');
readln;
end.
4
Bài tập 2
Viết chương trình nhập vào 2 số nguyên a và b. Xuất ra màn hình số lớn nhất trong 2 số.
VD:
Input: 2 3
Subject | Subject
Some text here about the topic of discussion
5
Bài tập 3
Viết chương trình nhập vào 3 số nguyên a, b và c. Xuất ra màn hình số lớn nhất trong 3 số.
VD:
Input: 5 3 4
Output: 35
6
Bài tập 2: Đáp án
program TH;
uses crt;
var a,b:integer;
begin
read(a,b);
if a>b then write(a)
else write(b);
end.
7
Bài tập 3: Đáp án
program TH;
uses crt;
var a,b,c:integer;
max: integer;
begin
read(a,b,c);
max:=a;
if b > max
then
max:=b
else if c>max then
max:=c;
write('so lon nhat la ',max);
readln;
end.
Thực hành:
Lập trình với câu lệnh điều kiện
Tin học 11 - Lập trình với ngôn ngữ Pascal
Show answer
Auto Play
Slide 1 / 7
SLIDE
Similar Resources on Wayground
6 questions
củng cố bài dòng điện trong chất điện phân
Presentation
•
11th Grade
6 questions
GRUPO # 8 PROPUESTAS PARA VIVIR LA LITERATURA INFANTIL
Presentation
•
KG
6 questions
Trò chơi "rung chuông vàng" về vòng đời phát triển của bướm
Presentation
•
KG
6 questions
teks eksplanasi
Presentation
•
11th Grade
3 questions
Bài 7. ANH HÙNG VÀ NGHỆ SĨ
Presentation
•
10th Grade
5 questions
Moises Belaris
Presentation
•
11th Grade
6 questions
Permasalahan Jaringan Komputer
Presentation
•
12th Grade
8 questions
Producto de Vectores
Presentation
•
11th Grade
Popular Resources on Wayground
20 questions
STAAR Review Quiz #3
Quiz
•
8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
6 questions
Marshmallow Farm Quiz
Quiz
•
2nd - 5th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
12 questions
What makes Nebraska's government unique?
Quiz
•
4th - 5th Grade
Discover more resources for Computers
20 questions
Grammar
Quiz
•
9th - 12th Grade
31 questions
Easter Trivia
Quiz
•
KG - 12th Grade
16 questions
Circles - Equations, Central & Inscribed Angles
Quiz
•
9th - 12th Grade
46 questions
Unit 4 Geosphere Test Review
Quiz
•
9th - 12th Grade
25 questions
Early Cold War Quizziz
Quiz
•
11th Grade
10 questions
Climate Change and Its Impact
Interactive video
•
9th - 12th Grade
35 questions
Venn Diagrams, Theoretical, & Experimental Review
Quiz
•
9th - 12th Grade
20 questions
Food Chains and Food Webs
Quiz
•
7th - 12th Grade