Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

programme for percentage calculation by if else statement for 10 students with grade in c programe

+2 votes
asked Oct 19, 2019 by mita chakraborty (140 points)

1 Answer

0 votes
answered Oct 26, 2019 by bushra solangi (140 points)
#include <stdio.h>

int main()

{

   int n,sum,i,j,k,l;

   float per;

   printf("Enter RANGE of students:");

   scanf("%d",&n);

   for(i=0;i<n;i++)

   {

   printf("Enter marks of 3 subjects:");

   scanf("%d %d %d",&j,&k,&l);

  sum=j+k+l;

   per=sum/3.0;

   if(per >=90)

   {

printf("A+ GRADE\n");

   }

    else if(per >=80)

   {

printf("A GRADE\n");

   }

   else if(per >=70)

   {

printf("B GRADE\n");

   }

   else if(per >=60)

   {

printf("C GRADE\n");

   }

   else if(per >=50)

   {

printf("D GRADE\n");

   }

   else

   {

printf("FAIL\n");

   }

   }

      return 0;

}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...