Computer Science, asked by nirmalikalita, 3 months ago

write a program using nesting to show the result of a student based on percentage and the conditions are :
if P>= 60 then 1st division
if P>= 45 then 2nd division
if P>= 30 then 3rd division or else Fail​

Answers

Answered by XxShAnTaNuxX
2

\huge\tt\underline\red{Answer}

Given an integer array marks, which comprises of marks scored by a student (out of 100) in different subjects, the task is to assign a grade to the student. The grade is found out by taking the percentage of the marks scored by the student. The percentage is calculated as:

The grade is assigned using the following rules:

Percentage Grade

90 and above A

80 to 89 B

60 to 79 C

33 – 59 D

below 33 F

Examples:

Input: marks = { 25, 65, 46, 98, 78, 65 }

Output: C

Input: marks = { 95, 88, 98, 93, 92, 96 }

Output: A

Similar questions