题解 | #成绩输入输出#
成绩输入输出
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,方便记忆