#include<stdio.h> int main(void) { int no; float s1,s2,s3; scanf("%d;%f,%f,%f",&no,&s1,&s2,&s3);//本想用字符数组来接收学号的,但是后面发现字符数组以空格和回车结束输入 printf("The each subject score of No. %d is %.2f, %.2f, %.2f.",no,s1,s2,s3);//输出小数时,以%.2f控制小数位数 return 0; }