You are on page 1of 1

PFC - Workshop 01

Q1 (8 points). Write a program that calculates scores for a student.


1. (7 points) Write a program that prompts a student to enter his scores: ongoing score, final exam
score, practical exam score and displays the entered data on the screen and his total score = (0.3*
ongoing score + 0.3*final exam score + 0.4*practical exam score).
2. (1 points). Display the result of a student (Passed or Not pass).
Completion Criteria:
- Every assessment component > 0
- Final Exam Score >= 4 & Total Score >= 5
The output from your program looks something like:

Q2 (2 marks). Write a program that performs the following tasks:


1. Input 3 real numbers a, b, c. // of the problem: ax2 + bx + c = 0
2. Calculate delta = b*b – 4*a*c, Assume that (b*b - 4ac) > 0.
3. Calculate 2 root of the above quadratic equation X1,2 = (- b +- b 2  4ac )/(2*a)
(Declare <math.h> library and use sqrt(double) function to compute: sqrt(delta) = √𝑑𝑒𝑙𝑡𝑎 )

Notes: Store all file in a folder with the following format and do compress, upload to CMS:
Class_RollNumber_FullName_Workshop01.
(e.x: SE1608_SE04392_NamNV_Workshop01.rar )

You might also like