CHAN K.

asked • 12/21/20

SELECTION CONTROL STRUCTURES

Create a complete C program for lecturers to keep track of students’ assessment.

● Ask the user to enter the type of assessment, either Q for Quiz or A for Assignment.

o Use switch case statement to identify their choice.

o If their choice is Quiz:

▪ Ask the user to enter quiz 1 and quiz 2 marks.

▪ Sum up the marks.

▪ Display the assessment type and total.

o If their choice is Assignment:

▪ Ask the user to enter the assignment marks.

▪ Use if else statement to identify the status of the assignment based

on the table below.



Assignment marks Assignment status

0 to less than 50 Re-do Assignment

50 to less than 70 Good

70 to 100 Excellent

Other values Not available


o Display the assessment type and the assignment status.

o If the user entered other values, display “Invalid assessment code entered”

o Display the results as shown below


Enter type of assesment:Q Enter type of assesment:A

Enter quiz 1 and quiz 2 marks: 7.5 , 10 Enter assignment marks:67

Assesment type:Quiz Assignment type:Assignment

Quiz total:17.50 Status:Good

Patrick B.

The source code is posted in the RESOURCES section if you look
Report

12/21/20

1 Expert Answer

By:

Patrick B. answered • 12/21/20

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.