题解 | #成绩输入输出#

成绩输入输出

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,方便记忆

全部评论

相关推荐

双尔:反手回一个很抱歉,经过慎重考虑,您与我的预期暂不匹配,感谢您的投递
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
10-29 21:14
疯犬丨哈士奇:喜欢你的人会主动表白,对你有想法的人会很主动,所以要你的公司不会吊着你所以懂了吧
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务