Question
Write a java program to print students total marks, percentage and grade. User input is given to enter number of subjects and then prompts user
Write a java program to print students total marks, percentage and grade.
User input is given to enter number of subjects and then prompts user to enter marks. Calculate Total marks, Student Percentage, Student Grade.
Note:
1. Maximum marks for a subject is 100.
2. percentage = (totalMarks/(count*100)) * 100;
>=90 is Grade A
>=80 and <=89.99 is Grade B
>=70 and <=79.99 is Grade C
>=60 and <=69.99 is Grade D
< 60 is Fail
Tips: use scanner for inputs, use for loop (to iterate and store marks), use switch statement (to print grades).
Sample Output:
Enter Number of Subject(s):
3
Enter Marks of 3Subject(s):
70
80
90
Total Marks : 240
Student Percentage: 80
Student Grade : B
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started