
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
5 questions
BÀI 11 - LUYỆN TẬP
Presentation
•
KG
8 questions
Sprint 7
Presentation
•
KG
6 questions
ĐƠN CHẤT NITROGEN
Presentation
•
11th Grade
6 questions
PENENTUAN PERUBAHAN ENTALPI BERDASARKAN DATA ENTALPI PEMBENTUKAN
Presentation
•
11th Grade
6 questions
EXPONENTES RACIONALES
Presentation
•
11th Grade
6 questions
Số 5
Presentation
•
KG
6 questions
bài học quizizz
Presentation
•
KG
7 questions
Pengalamatan Jaringan CIDR
Presentation
•
11th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade