Create a simple class record program(C program) that will do the following: - Accept a student's complete name - Set the number of Quizzes - Accept a Quiz Perfect score(minimum of 5 quizzes but can go beyond 5 depending on the number of quizzes input by the teacher). - Accept the actual student score. - Compute the total student's score(actual score), Perfect score, passing score. - Get the average scores. - Compare each perfect score and actual student score. If the actual score is greater than the perfect score, display "Please encode again, your score is greater than the perfect score". If the actual score is lesser than or equal to the perfect score, compute the total score and average. - Depending on the total perfect score, compute the passing score. The passing score should be 60% of the perfect score. - Compare the passing score and the student's actual score. If the actual score is lower than the passing score, display "Failed" in the remarks. But if the actual score is greater than or equal to the passing score, display "Passed" in the remarks.
Types of Loop
Loops are the elements of programming in which a part of code is repeated a particular number of times. Loop executes the series of statements many times till the conditional statement becomes false.
Loops
Any task which is repeated more than one time is called a loop. Basically, loops can be divided into three types as while, do-while and for loop. There are so many programming languages like C, C++, JAVA, PYTHON, and many more where looping statements can be used for repetitive execution.
While Loop
Loop is a feature in the programming language. It helps us to execute a set of instructions regularly. The block of code executes until some conditions provided within that Loop are true.
PLEASE USE DO-WHILE, WHILE LOOP, AND FOR LOOP, IF ELSE, AD SWITCH-CASE
Create a simple class record program(C program) that will do the following:
- - Accept a student's complete name
- - Set the number of Quizzes
- - Accept a Quiz Perfect score(minimum of 5 quizzes but can go beyond 5 depending on the number of quizzes input by the teacher).
- - Accept the actual student score.
- - Compute the total student's score(actual score), Perfect score, passing score. - Get the average scores.
- - Compare each perfect score and actual student score. If the actual score is greater than the perfect score, display "Please encode again, your score is greater than the perfect score". If the actual score is lesser than or equal to the perfect score, compute the total score and average.
- - Depending on the total perfect score, compute the passing score. The passing score should be 60% of the perfect score.
- - Compare the passing score and the student's actual score. If the actual score is lower than the passing score, display "Failed" in the remarks. But if the actual score is greater than or equal to the passing score, display "Passed" in the remarks.
Sample output:
Step by step
Solved in 2 steps