2014年(73)
分类: C/C++
2014-11-26 20:23:24
#include
int main()
{
float shuxue, yuwen, wuli, huaxue;
int select;
shuxue=138;
yuwen=59;
wuli=98;
huaxue=100;
scanf("%d", &select);
if(select==1)
{
printf("数学成绩为%.1f\n", shuxue);
return 0;
}
else if(select==2)
{
printf("语文成绩为%.1f\n", yuwen);
return 0;
}
else if(select==3)
{
printf("物理成绩为%.1f\n", wuli);
return 0;
}
else if(select==4)
{
printf("化学成绩为%.1f\n", huaxue);
return 0;
}
else
{
printf("总分为395\n");
return 0;
}
return 0;
}