write a program to accept marks in 5 subjects from users. calculate total and percentage.if percentage is greater than 40 display result as "pass" else display result as "fail"
Answers
Answered by
2
Answer:
please mark as brainliest.
hope it helps you.
Explanation:
int main(void){
int num;
printf("Enter your mark ");
scanf("%d",&num);
printf(" You entered %d", num); // printing outputs
if(num >= 80){
printf(" You got A grade"); // printing outputs
}
else if ( num >=60){ // Note the space between else & if
printf(" You got B grade");
}
else if ( num >=40){
printf(" You got C grade");
}
else if ( num < 40){
printf(" You Failed in this exam");
}
return 0;
}
Answered by
2
Heyaa friend !
- Your program is provided in the image attached above. It is written in Java language.
_________________________
Thank you ! ♠
Doubts are most welcome :)
Attachments:
Similar questions