标题:新手,请教。。。
取消只看楼主
tehi
Rank: 1
等 级:新手上路
帖 子:16
专家分:0
注 册:2008-8-15
 问题点数:0 回复次数:1 
新手,请教。。。
main()
    {
    int score;
    scanf("%d",&score);
    if(score<0&&score>100)printf("you put a wrong score.");
    else if(score<60)printf("you score is E.");
    else if(score>=60&&score<70)printf("you score is D.");
    else if(score>=70&&score<80)printf("you score is B.");
    else if(score>=80&&score<90)printf("you score is C.");
    else printf("you score is A.");
    }
输入大于100的数 还是显示you score is A. 不知道怎么回事 请指教。
谢谢。
搜索更多相关主题的帖子: score int wrong 
2008-08-15 12:44
tehi
Rank: 1
等 级:新手上路
帖 子:16
专家分:0
注 册:2008-8-15
得分:0 
谢谢 谢谢
我也想明白为什么错了。
2008-08-15 17:32



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




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

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