Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

PRF192 Workshop1 Test

Time: 30 minutes

Students use files: Q1.c, Q2.c, Q3.c và Q4.c to write following tasks and submit to the CMS
system.

Q1 (2 points): Write a program to input an integer number N, check and display on screen if
N is TENS NUMBER or not.

Q2 (2 points): Write a program to input a student mark M, calculate and display student’s
rating:
INPUT (MARK) OUTPUT (RATING)

From 9.0 to 10.0 Excellent

From 8.0 to under 9.0 Very good

From 7.0 to under 8.0 Good

From 5.0 to under 7.0 Average good

Under 5.0 Ordinary

Q3 (3 points): Write a program to input an integer number N, calculate and display on


screen the result of following serie:
S = 5 + 10 + 15 + 20 + … + N*5

Q4 (3 points): Write a program to input an integer number N, calculate and display on


screen following number triangle.

You might also like