c program on grades of a student
hi
i have tried to do this c program but i have checked alot of times but it is still giving me 3 errors, like unterminated string or character constant ,function call missing ,statement missing,so plz tell me what's wrong in it?
it should print fail when the average marks 0f 5 subjects are between 0 to 39;third division when the average marks of a student are between 40 to 49;second division when 50 to 59;first division when 60 to 79;it should print honours when the average marks are between 80 to 100.
so i did like this:
#include<stdio.h>
#include<conio.h>
void main()
{
float eng,maths,de,it,c,avmar;
printf("enter the marks for english:");
scanf("%f",&eng);
printf("enter the marks for maths:");
scanf("%f",&maths);
printf("enter the marks for digital electronics:");
scanf("%f",&de);
printf("enter the marks for information technology:");
scanf("%f",&it);
printf("enter the marks for c:");
scanf("%f",&c);
avmar=(eng+maths+de+it+c)/5;
printf("the average marks are=%f",avmar);
if((avmar<39)&&(avmar>0))
printf("fail");
else if((avmar<49)&&(avmar>40))
printf("third division");
else if((avmar<59)&&(avmar>50))
printf("second division");
else if((avmar<79)&&(avmar>60))
printf("first division");
else ((avmar<100)&&(avmar>80))
printf("honours");
getch();
}
now what's wrong in it?
the compiler is showing error in line 14 as unterminated string or character constant?what do we mean by that?
and in line 15 an d 27....
im completely puzzeled by this....
guys plz help me out..........
have i written the corrct program........?