Computer Science, asked by pratyush112, 1 year ago

Write a program that the teacher to enter the marks scored in computer by 10 students. Find and print the average marks of the group


satagr: yup
jejwje: Sorry for that, I don't use java
satagr: its ok bro
jejwje: If you are intrested in physics solve my given question
pratyush112: sorry
pratyush112: o icant
satagr: bro plz dont call
pratyush112: ok
pratyush112: sorry
jejwje: Can anyone tell me What is DNS Server

Answers

Answered by himanshubrain
0
here is the code in total with sub function that let you to input multiple time with grading system. Please edit as your needs.

--------------------------------------------------------------
# include <stdio.h>

float verify (float a)
{

float output;

if (a>=80)
{
output=4;

}

else if (a>=75 && a<=79){

output= 3.75;

}
else if (a>=70 && a<=74){

output= 3.5;

}
else if (a>=65 && a<=69){

output= 3.25;

}
else if (a>=60 && a<=64){

output= 3.0;

}
else if (a>=55 && a<=59){

output= 2.5;

}

else if (a>=50 && a<=54){

output= 2.0;

}
else if (a>=40 && a<=49){

output= 1.0;

}

else
{ output= 0.0;}

return output;

}

int main ()

{
a:
float number ;
printf("Please Enter the course result marks: ");

scanf("%f", &number);

printf("The GPA is: %f", verify (number));

return 0;
goto a;
Similar questions