wrong answer

#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
float hard,tens;
float carb;
while(n–)
{

scanf("%d%f%d",&hard,&carb,&tens);
if(hard>50&&carb<0.7&&tens>5600)
{
printf("10\n");}
else if(hard>50&&carb<0.7&&tens<5600)
{
printf("9\n");}
else if(hard<50&&carb<0.7&&tens>5600)
{
printf("8\n");}
else if(hard>50&&carb>0.7&&tens>5600)
{
printf("7\n");}
else if(hard>50||carb<0.7||tens>5600)
{
printf("6\n");}
else
{
printf("5\n");}

}
return 0;

}

what is wrong with this? i seriously dont understand. it happens to my every code. Whereas its properly running when its run outside codechef

Please provide a link to the problem
I think this code will get compilation error before it gets a wrong answer because:

  1. you are using %d for float values
  2. you have not closed the brackets that you have opened in else ifs

Please include the problem link, and your submitted solution link.

https://www.codechef.com/viewsolution/18874660

this is the link. i corrected it to %f sry for that. but i still get wrong answer and i have closed every bracket

https://www.codechef.com/viewsolution/18874660

this is the link. i corrected it to %f sry for that. but i still get wrong answer