题解 | #学生基本信息输入输出#
学生基本信息输入输出
https://www.nowcoder.com/practice/58b6a69b4bf943b49d2cd3c15770b9fd
#include <stdio.h> int main() { long long n; float a,b,c; scanf("%lld;%f,%f,%f",&n,&a,&b,&c); printf("The each subject score of No. %lld is %.2f, %.2f, %.2f.",n,a,b,c); return 0; }
小数在内存中可能不会精确保存,虽然double精度比float更高,但是本题要求四舍五入,所以用float