题解 | 学生基本信息输入输出
学生基本信息输入输出
https://www.nowcoder.com/practice/58b6a69b4bf943b49d2cd3c15770b9fd
#include <stdio.h>
int main() {
int num = 0;
float c = 0.0;
float math = 0.0;
float english = 0.0;
scanf("%d;%f,%f,%f",&num,&c,&math,&english);
c = (int)((c*100)+0.5)/100.0;
math = (int)((math*100)+0.5)/100.0;
english = (int)((english*100)+0.5)/100.0;
printf("The each subject score of No. %d is %.2f, %.2f, %.2f.",num,c,math,english);
return 0;
}