using if else statement write a program in java to calculate the percentage of marks of five subjects.
Answers
Answered by
0
//just the main lines
for (i=0;i<5;i++)
{
marks=in.nextInt()//If using a Scanner Class
sum_marks=sum_marks+marks;
}
if((sum_marks/5)>=90)
S.o.pln("90% marks scores");
else if((sum_marks/5)>=80 && (sum_marks/5)<90)
S.o.pln("80% marks scores");
.
.
.
else
....
Similar questions
Math,
7 months ago