搜索
楼主: 李掌柜
打印 上一主题 下一主题

【一天一练】【2014.5.28】【学习成绩的等级问题】

[复制链接]
楼主
发表于 2015-11-6 18:18:57 | 显示全部楼层
#include <stdio.h>
char grades(int n)
{
    switch(n/10)
    {
        case 9:return 'A';
        case 8:return 'B';
        case 7:return 'C';
        case 6:return 'D';
        default:return 'E';
    }
}
int main()
{
        char c;
    int n;
    scanf("%d",&n);
    c=grades(n);
    printf("%c",c);
        system("pause");
        return 0;
}[mw_shl_code=c,true][/mw_shl_code]
沙发
发表于 2015-11-6 18:20:17 | 显示全部楼层
福华 发表于 2015-11-6 18:18
#include
char grades(int n)
{

这个不算
板凳
发表于 2015-11-6 18:20:33 | 显示全部楼层
[mw_shl_code=c,true]#include <stdio.h>
char grades(int n)
{
    switch(n/10)
    {
        case 9:return 'A';
        case 8:return 'B';
        case 7:return 'C';
        case 6:return 'D';
        default:return 'E';
    }
}
int main()
{
        char c;
    int n;
    scanf("%d",&n);
    c=grades(n);
    printf("%c",c);
        system("pause");
        return 0;
}[/mw_shl_code]
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

广播台
特别关注
快速回复 返回顶部 返回列表