write a program to accept marks of four subject as input from user. Calculate and display total and percentage marks of student.
Answers
Answered by
1
Answer:
Input marks of five subjects in some variable say phy, chem, bio, math and comp.
Calculate percentage using formula per = (phy + chem + bio + math + comp) / 5.0;. Carefully notice I have divided sum with 5.0, instead of 5 to avoid integer division.
On the basis of per find grade of the student.
Check if(per >= 90) then, print "Grade A".
If per is not more than 90, then check remaining conditions mentioned and print grade.
Similar questions