题解 | 学生基本信息输入输出
学生基本信息输入输出
https://www.nowcoder.com/practice/58b6a69b4bf943b49d2cd3c15770b9fd
#include <stdio.h>
#include <math.h>
int main() {
long int i;
float a,b,c;
scanf("%ld;",&i);
scanf("%f,%f,%f",&a,&b,&c);
float A=round(a*100)/100;
float B=round(b*100)/100;
float C=round(c*100)/100;
printf("The each subject score of No. %d is %0.2f, %0.2f, %0.2f.",i,A,B,C);
return 0;
}
