Why i m getting grade 9 in output?

int main()
int a,b,c;
printf (“enter carbon content\n”);
scanf ("%d %d %d" ,&a,&b,&c);
if (a>50 && b<0.7 && c>5600)
printf (" grade 10\n");
else if (a>50 && b<0.7 && c<5600)
printf (" grade 9\n");
else if( a<50 && b< 0.7 && c>5600)
printf(" grade 8\b");
else if (a>50 && b>0.7 && c>5600)
printf(" grade 7\n");
else if ( a>50 || b<0.7 ||c>5600)
printf (" grade 6\n");
printf (" grade 5\n");
return 0;

I don’t know - what input are you giving it?

Here is the link to the solution of the problem you’re trying to solve:

but i want to know where i am going wrong?

One way you’re “going wrong” is “not telling us what input you’re giving it” :slight_smile:

b being an int is odd, as well.

This is the problem i m trying to solve