Write a C++ program to print the total obtained marks and grade of a student after taking all the required inputs using the grading policy given. Assessment Activity Percentage Assignments 10% Quizzes 10% Mid Term Exam 30% Project 10% End Term Exam 40% Make the menu-driven program and use a loop so that the user can repeat the program for different values. Grade calculation chart is given below. Note: Use switch statement for grade calculation. Marks Grade 90-100 A 80-89 B 70-79 C 60-69 D 50-59 E Less than 50 F Sample Output: Enter assignments marks out of 10: 7 Enter quizzes marks out of 10: 8 Enter mid-term marks out of 30: 23 Enter project marks out of 10: 6 Enter final exam marks out of 40: 34 Your total marks are 78 and grade is C Do you want another try (y/n): y Enter assignments marks out of 10: 9 Enter quizzes marks out of 10: 9 Enter mid-term marks out of 30: 27 Enter project marks out of 10: 8 Enter final exam marks out of 40: 36 Your total marks are 89 and grade is B Do you want another try (y/n): n Thank You…
Control structures
Control structures are block of statements that analyze the value of variables and determine the flow of execution based on those values. When a program is running, the CPU executes the code line by line. After sometime, the program reaches the point where it has to make a decision on whether it has to go to another part of the code or repeat execution of certain part of the code. These results affect the flow of the program's code and these are called control structures.
Switch Statement
The switch statement is a key feature that is used by the programmers a lot in the world of programming and coding, as well as in information technology in general. The switch statement is a selection control mechanism that allows the variable value to change the order of the individual statements in the software execution via search.
Write a C++ program to print the total obtained marks and grade of a student after taking all the required inputs using the grading policy given.
Assessment Activity |
Percentage |
Assignments |
10% |
Quizzes |
10% |
Mid Term Exam |
30% |
Project |
10% |
End Term Exam |
40% |
Make the menu-driven program and use a loop so that the user can repeat the program for different values.
Grade calculation chart is given below.
Note: Use switch statement for grade calculation.
Marks |
Grade |
90-100 |
A |
80-89 |
B |
70-79 |
C |
60-69 |
D |
50-59 |
E |
Less than 50 |
F |
Sample Output:
Enter assignments marks out of 10: 7
Enter quizzes marks out of 10: 8
Enter mid-term marks out of 30: 23
Enter project marks out of 10: 6
Enter final exam marks out of 40: 34
Your total marks are 78 and grade is C
Do you want another try (y/n): y
Enter assignments marks out of 10: 9
Enter quizzes marks out of 10: 9
Enter mid-term marks out of 30: 27
Enter project marks out of 10: 8
Enter final exam marks out of 40: 36
Your total marks are 89 and grade is B
Do you want another try (y/n): n
Thank You…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images