What's wrong with this program??
#include <stdio.h>
int main void
{
int a,b,c,d;
float avg;
printf("Please insert score test 1: ");
scanf("%d",&a);
printf("Please insert score test 2: ");
scanf("%d",&b);
printf("Please insert score test 3: ");
scanf("%d",&c);
avg=(a+b+c)/3;
}
{
if (avg>=90);
printf("Your Grade is A");
else if (avg<90);
if (c>=90);
printf("Your Grade is A");
else
printf("Your Grade is B");
else if(avg<70);
printf("Your Grade is C");
else if(avg<50);
printf("Your Grade is D");
}
i want separate that function
1 for read score
2 for determine average
3 print result
can you teach me??