#include <iostream>
using namespace std;
float compared(float n)
{
float temp=int(n*100);
n*=100;
if(temp+0.5<=n)
return (temp+1)/100;
else
return temp/100;
}//2位数四舍五入
int main()
{
long a;
float b,c,d;
scanf("%ld;%f,%f,%f",&a,&b,&c,&d);
printf("The each subject score of No. %ld is %.2f, %.2f, %.2f.",a,compared(b),compared(c),compared(d));
return 0;
}// 64 位输出请用 printf("%lld")

京公网安备 11010502036488号