| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 377 人关注过本帖
标题:请大家看看我这段C++代码有什么错误
只看楼主 加入收藏
wwuusong
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-3-16
收藏
 问题点数:0 回复次数:0 
请大家看看我这段C++代码有什么错误

请大家看看我这段代码有什么错误
错在哪里
怎么改正
谢谢了
……

#include"stdio.h"
main()
{
int score;
char grade;
printf("\nplease input a student score:");
scanf("%f",&score);
if(score>100||score<0)
printf("\ninput error!");
else
{if(score>=90)
grade='A';
else
{if(score>=70)
grade='B';
else
{if(score>=60)
grade='C';
else grade='E';
}
}
}
printf("\nthe student grade:%c",grade);
}

搜索更多相关主题的帖子: 代码 
2007-03-22 20:05
快速回复:请大家看看我这段C++代码有什么错误
数据加载中...
 
   



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

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