This Java program takes marks for 6 subjects as input from the user, calculates the total and average marks, and uses the average to determine the grade (A, B, C or D) based on predefined thresholds. The program initializes an array of size 6 to store the marks for each subject, uses a for loop to take input from the user and store in the array, calculates total and average, and then uses if/else conditions to assign a letter grade based on the average.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
33 views2 pages
Import Java - Uti
This Java program takes marks for 6 subjects as input from the user, calculates the total and average marks, and uses the average to determine the grade (A, B, C or D) based on predefined thresholds. The program initializes an array of size 6 to store the marks for each subject, uses a for loop to take input from the user and store in the array, calculates total and average, and then uses if/else conditions to assign a letter grade based on the average.