Thứ Ba, 27 tháng 1, 2015

Bài tập Exercise for drawing DAY 1

Bài 1:Write a pseudo code and draw a flowchart to accept a value in degrees Celsius and to convert it into Fahrenheit. [Hint: C/5 = (F-32)/9]

Begin
Input C
F = 9C/5(F - 32)
Display F
END


Bài 2:Write a pseudo code and flowchart to accept a student’s marks in Physics, Chemistry, and Biology. The total of these marks as well as the average should be displayed.

Begin
Input Physics, Chemistry, Biology
Tổng = Physics + Chemistry + Biology
TCB = (Physics + Chemistry + Biology)/3
Display Tổng
Display TCB
END

Bài 3:Write flowchart to check a any number  (0-N), is it a prime?

Begin
Input N
Gắn I=1 để N / 1
Cứ thế I tăng thêm 1 xem N có chia hết cho I hay không
Nếu I < N thì sẽ quay lại bước 3
END



Không có nhận xét nào:

Đăng nhận xét