user-0 提问: 我想问一下newline  in constant和 error C2018: unknown character '0xb7'的错误

回复:
user: user-1
content: 希望对你有帮助：https://blog.csdn.net/it_xiangqiang/category_10581430.html 希望对你有帮助：https://blog.csdn.net/it_xiangqiang/category_10768339.html

user: user-2
content: 供参考：void sta(table *x) {     int a,b,c,d,e;     float A,B,C,D,E,NUM;     int i;     a=b=c=d=e=0;     NUM=(float)x->length;     for(i=x->length;i>0;i--)     {         if(x->r[i].score>100||x->r[i].score<0)            printf("错误！%s同学的分数超出上限！\n",x->r[i].name);         else if(x->r[i].score>=90&&x->r[i].score<=100)a++;         else if(x->r[i].score>=80&&x->r[i].score<=89) b++;         else if(x->r[i].score>=70&&x->r[i].score<=79) c++;         else if(x->r[i].score>=60&&x->r[i].score<=69) d++;         else if(x->r[i].score>=0 &&x->r[i].score<=60) e++;      }     A=(float)a/NUM;//A=NUM/(float)a;     B=(float)b/NUM;//B=NUM/(float)b;     C=(float)c/NUM;//C=NUM/(float)c;     D=(float)d/NUM;//D=NUM/(float)d;     E=(float)e/NUM;//E=NUM/(float)e;     printf("总共有%d位同学\n"            "分数于90到100的同学有%d位,占总人数的%f\n"            "分数于80到89的同学有%d位,占总人数的%f\n"            "分数于70到79的同学有%d位,占总人数的%f\n"            "分数于60到69的同学有%d位,占总人数的%f\n"            "分数于60以下同学有%d位,占总人数的%f\n",            x->length,a,A,b,B,c,C,d,D,e,E); }

user: user-0
content: 哦对了，第一个错误对应这行printf("总共有%d位同学\n

user: user-3
content: switch (x->r[i].score/10) {             //case 8:             case 9:             case 10:                 a++;                 break;               case 8:                 b++;                 break;               case 7:                 c++;                 break;               case 6:                 d++;                 break;               case 0:             case 1:             case 2:             case 3:             case 4:             case 5:                 e++;                 break;               default:             printf("错误！%s同学的分数超出上限！\n",x->r[i].name);         } 改一下  供参考～

user: user-3
content: void sta(table *x) {     int a,b,c,d,e;     float A,B,C,D,E,NUM;     int i;     a=b=c=d=e=0;     NUM=(float)x->length;     for(i=x->length;i>0;i--)     {  #if 1         switch (x->r[i].score/10) {             case 8:             case 9:             case 10:                 a++;                 break;              case 8:                 b++;                 break;              case 7:                 c++;                 break;              case 6:                 d++;                 break;              case 0:             case 1:             case 2:             case 3:             case 4:             case 5:                 e++;                 break;              default:             printf("错误！%s同学的分数超出上限！\n",x->r[i].name);         } #else         if(x->r[i].score>100||x->r[i].score<0)             printf("错误！%s同学的分数超出上限！\n",x->r[i].name);         else if(x->r[i].score>=90&&x->r[i].score<=100)             a++;         else if(x->r[i].score>=80&&x->r[i].score<=89)             b++;         else if(x->r[i].score>=70&&x->r[i].score<=79)             c++;         else if(x->r[i].score>=60&&x->r[i].score<=69)             d++;         else if(x->r[i].score>=0&&x->r[i].score<=60)             e++; #endif     }     /*     A=NUM/(float)a;     B=NUM/(float)b;     C=NUM/(float)c;     D=NUM/(float)d;     E=NUM/(float)e;     */      A= a/NUM;     B= b/NUM;     C= c/NUM;     D= d/NUM;     E= e/NUM;     printf("总共有%d位同学\n             分数于90到100的同学有%d位\n             占总人数的%f\n             分数于80到89的同学有%d位\n             占总人数的%f\n             分数于70到79的同学有%d位\n             占总人数的%f\n             分数于60到69的同学有%d位\n             占总人数的%f\n             分数于60以下同学有%d位\n             占总人数的%f\n",x->length,a,A,b,B,c,C,d,D,e,E); } 供参考～

user: user-2
content: 2#楼第16行修改为：else if(x->r[i].score>=0 &&x->r[i].score<=59) e++;

user: user-4
content: printf("总共有%d位同学\n 分数于90到100的同学有%d位\n 占总人数的%f\n 分数于80到89的同学有%d位\n 占总人数的%f\n 分数于70到79的同学有%d位\n 占总人数的%f\n 分数于60到69的同学有%d位\n 占总人数的%f\n 分数于60以下同学有%d位\n 占总人数的%f\n",x->length,a,A,b,B,c,C,d,D,e,E); //应改为 printf("总共有%d位同学\n" "分数于90到100的同学有%d位\n" "占总人数的%f\n" "分数于80到89的同学有%d位\n" "占总人数的%f\n" "分数于70到79的同学有%d位\n" "占总人数的%f\n" "分数于60到69的同学有%d位\n" "占总人数的%f\n" "分数于60以下同学有%d位\n" "占总人数的%f\n",x->length,a,A,b,B,c,C,d,D,e,E);

user: user-5
content: 要么每行成对的双引号，要么在\n后面敲回车前敲一个反斜线