DEV c++ 无法编译
代码如下#include<stdio.h>intmain(void){intgrade,acount=0,bcount=0,ccount=0,dcount=0,fcoun...
代码如下
# include <stdio.h>
int main (void)
{
int grade,acount=0,bcount=0,ccount=0,dcount=0,fcount=0;
printf("Enter the letter grade.\n");
printf("Enter the EOF character to end input.\n");
while ((grade = getchar())!= EOF ) {
switch (grade){
case 'a':
++acount;
break;
case 'b':
++bcount;
break;
case 'c':
++ccount;
break;
case 'd':
++dcount;
break;
case 'f':
++fcount;
break;
case '\n':
case '\t':
case '' :
break;
default:
printf("OKAY?");
printf("Please Again!!!\n");
break;
}
}
printf("\n\nTotals for each letter grade are:\n");
printf("A:%d\n",acount) ;
printf("B:%d\n",bcount) ;
printf("C:%d\n",ccount) ;
printf("D:%d\n",dcount) ;
printf("F:%d\n",fcount) ;
return 0;
}
无法编译为exe啊,高手帮帮,我很菜的~~ 展开
# include <stdio.h>
int main (void)
{
int grade,acount=0,bcount=0,ccount=0,dcount=0,fcount=0;
printf("Enter the letter grade.\n");
printf("Enter the EOF character to end input.\n");
while ((grade = getchar())!= EOF ) {
switch (grade){
case 'a':
++acount;
break;
case 'b':
++bcount;
break;
case 'c':
++ccount;
break;
case 'd':
++dcount;
break;
case 'f':
++fcount;
break;
case '\n':
case '\t':
case '' :
break;
default:
printf("OKAY?");
printf("Please Again!!!\n");
break;
}
}
printf("\n\nTotals for each letter grade are:\n");
printf("A:%d\n",acount) ;
printf("B:%d\n",bcount) ;
printf("C:%d\n",ccount) ;
printf("D:%d\n",dcount) ;
printf("F:%d\n",fcount) ;
return 0;
}
无法编译为exe啊,高手帮帮,我很菜的~~ 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询