0% found this document useful (0 votes)
16 views1 page

Program 6

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Program 6

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

#include <stdio.

h>
int main()
{
int sum=0;
int marks[6];
for(int i=0;i<6;++i)
{
printf("Enter the marks of student for subject code 00597%d:-\t",i+1);
scanf("%d",&marks[i]);
printf("\n");
}
for(int i=0;i<6;++i)
{
sum=sum+marks[i];
}
int average=(sum)/60;
switch(average)
{
case 9:
printf("Your grade is A+");
break;

case 8:
printf("Your grade is A");
break;

case 7:
printf("Your grade is B+");
break;

case 6:
printf("Your grade is B");
break;

case 5:
printf("Your grade is C+");
break;

case 4:
printf("Your grade is C");
break;

case 3:
printf("Your grade is D");
break;

case 2:
printf("You failed , try again");
break;

default:
printf("Wrong data");
break;
}
return 0;
}

You might also like