标题:残念do--while
取消只看楼主
citystudy
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2011-10-2
结帖率:0
 问题点数:0 回复次数:0 
残念do--while
#include <stdio.h>

void main(){
    char a,b,c;
    do{
        printf("input the grade");
        scanf("%c",&c);
        switch(c){
        case 'A':case 'a': printf("wonderful");
            break;
        case 'B':case 'b':printf("good");
            break;
        case 'C':case 'c':printf("soso");
            break;
        case 'D':case 'd':printf("bad");
            break;
        default:
            printf("wrong");
            break;
        }
                printf("more student?(y to continue");
        scanf("%c",&a);
    }while(a!='y');
}

这个程序会跳过more students 的验证,求指教为什么啊
搜索更多相关主题的帖子: soso default include wrong break 
2011-10-03 21:35



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-351537-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.302689 second(s), 10 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved