Computer Science, asked by jayeshbhaisolanki1, 1 day ago

input the value of 5 subject, English, Hindi, Economics, Social Science, Maths. Find out the total marks,percentage and grade using the flowchart.​

Answers

Answered by samarthkrv
0

Answer:

#include <stdio.h>

int main() {

   double esm , total , average , percentage ,esm1;

   int subjects;

   printf("Enter the number of subjects:");

   scanf("%i" , &subjects);

   printf("Enter total marks for each subject:");

   scanf("%lf" , &esm1);

   double grades[subjects];

       for(int i = 0; i < subjects; i++)

           {

               printf("Enter marks of subject %i:" , (i+1));

               scanf("%lf" , &esm);

               grades[i] = esm;

               total = total + grades[i];

           }

           percentage = (total / (esm1*subjects)) * 100;

           average = total / subjects;

           printf("Your total is : %lf \n" , total);

           printf("Your average is :%lf \n" , average);

           printf("Your percentage is :%lf\n" , percentage);

   return 0;

}

Explanation: in c language not in flowchart

Similar questions