#include <stdio.h>

int main() {
    int Bengali, English, Physics, Math, Chemistry, Biology; 
   printf("Enter numbers for six subjects \n");
   scanf("%d %d %d %d %d %d", &Bengali, &English, &Physics, &Math, &Chemistry, &Biology);
	 int lowMarks = Bengali;
    if(English < lowMarks) {
        lowMarks = English;
    } 
    if (Physics < lowMarks) {
        lowMarks = Physics;
    } 
    if (Math < lowMarks) {
        lowMarks = Math;
    } 
    if (Chemistry < lowMarks) {
        lowMarks = Chemistry;
    } 
    if (Biology < lowMarks) {
        lowMarks = Biology;
    }
    int total = (Bengali + English + Physics + Math + Chemistry + Biology) - lowMarks;
	 printf("Total : %d\n", total); 
    double percentage = (total / 500.0) * 100;
    printf("Percentage : %.2f\n", percentage); 
	 if (total >= 450){
	 	printf("Grade A+");
	 } 
     else if (total >= 400) {
	 	printf("Grade A");
	 } 
     else if (total >= 375) {
	 printf("Grade B+");
} 
     else if (total >= 300) {
	printf("Grade B");
} else if (total >= 250) {
	printf("Grade C");
} else if(total >= 200) {
         printf("Grade D");
    } else {
         printf("Fail");
    }
   
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: