int main()
{
float score[2][2] = {0}
for (int i = 0 i < 2 i++)
{
for (int j = 0 j < 2 j++)
{
scanf("%f", &score[i][j])
}
}
printf("----------------------\n")
printf("----------------------\n")
for (int i = 0 i < 2 i++)
{
printf("%-4d%-6.1f%-6.1f%6.1f\n", i + 1, score[i][0], score[i][1], score[i][0] + score[i][1])
}
return 0
}
//测试输出:
//80.0
//90.5
//90.5
//70.5
//----------------------
//序号语文 数学 总成绩
//----------------------
//1 80.0 90.5 170.5
//2 90.5 70.5 161.0
strcpy(students[i].grade,"set_grade(score)")=>students[i].grade=set_grade(score)students[i].grade-"D"==0 =>students[i].grade-'D'==0