87 086
Assignments Done
98.6%
Successfully Done
In May 2020

Answer to Question #45550 in C for linz

Question #45550
write a C program that keeps the marks of 10 subjects in an array. if the CGPA is 4 then display &quot;Excellence&quot;. Else if the CGPA is between 3.50 to 3.99then display &quot;promising&quot;. Else if the CGPA is between 2.75 to 3,49 then display &quot; very good&quot;. else if the marks is less than 2.75 then display &quot;Satisfactory&quot;.
1
2014-09-05T12:03:45-0400
#include #include //function main begins program executionint main(int argc, char *argv[]){   //array of marks   double marks[10];   //prompt user to enter marks   for(int i=0;i<10;i++){     printf("Enter mark %d [2.75-4]: ",(i+1));//show our text Hello world     scanf("%lf",&marks[i]);   }   double sum=0;   //calculate sum of 10 subjects   for(int i=0;i<10;i++){      sum+=marks[i];   }   double CGPA=sum/10;   //check if CGPA is Excellence   if(CGPA==4){     printf("Excellence\n");   }   //check if CGPA is Promising   if(CGPA>=3.50 && CGPA<= 3.99){     printf("Promising\n");   }   //check if CGPA is Very good   if(CGPA>= 2.75 && CGPA<= 3.499){     printf("Very good\n");   }   //check if CGPA is Satisfactory   if(CGPA< 2.75){     printf("Satisfactory\n");   }   //delay   system("PAUSE");         return 0;//indicate that program ended successfully}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!