#include<stdio.h>
int main()
{
    long std_id=0;
    float score1=0,score2=0,score3=0;

    scanf("%ld;%f,%f,%f",&std_id,&score1,&score2,&score3);
    printf("The each subject score of No. %d is %.2f, %.2f, %.2f.",std_id,score1,score2,score3);
    return 0;
}
不知道为什么用double不可以,用float就可以了