程中出现debug error,咋办?
debug吧
全部回复
仅看楼主
level 1
abc727101 楼主
#include <stdio.h>
int main()
{
int n,a,b,c,score;
scanf("%d",&n);
if(n<60)
printf("The score is 0.\n");
else
{
if(n>=90)
printf("The score is 4.0.\n");
else
{
a=n/10;
b=(n%10)/3;
switch(b)
{
case 0: c=0.0;break;
case 1: c=0.3;break;
case 2:
case 3: c=0.7;break;
}
score=a-5+c;
printf("The score is %1.1f\n",score);
}
}
return 0;
}
2012年11月12日 12点11分 1
1