题解 | #成绩输入输出#

成绩输入输出

https://www.nowcoder.com/practice/eb49750ef0de47168c21761de086d97c

#include <stdio.h>

int main() {
    short short chn,math,eng;
    scanf("%hhd %hhd %hhd\n",&chn,&math,&eng);
    printf("score1=%hhd,score2=%hhd,score3=%hhd\n",chn,math,eng);
    return 0;
}

数据范围1-100,用1B存储即可

%d是4B,%hd是2B,%hhd是1B。猜测h的意思是half,方便记忆

全部评论

相关推荐

不愿透露姓名的神秘牛友
05-01 13:13
ecece:这么明目张胆虚报就业率啊
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务