break语句在switch中的应用

/*brreak语句在switch中的应用*/
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int x;
printf("Please input a score:");
scanf("%d",&x);
switch(x)
{
case 5:printf("excellent");break;
case 4:printf("Good");break;
case 3:printf("Pass");break;
case 2:printf("Fail");break;
default:printf("Poor");
}
system("PAUSE");
return 0;
} /*end main*/

posted @ 2017-03-15 17:18  HGR  阅读(350)  评论(0编辑  收藏  举报