#include<stdio.h> int main() { long int n; float a=0; float b=0; float c=0; scanf("%ld;%f,%f,%f",&n,&a,&b,&c); if(n>=1&&n<=20000000) printf("The each subject score of No. %ld is %.2f, %.2f, %.2f.",n,a,b,c); return 0; } 再打印输出保留两位小数时,若使用cout或cin会困难,建议使用scanf和printf...