点击(此处)折叠或打开
-
#include <stdio.h>
-
int main()
-
{
-
float math,chinese,physic,chemistry,sum;
-
int select;
-
math =138;
-
chinese =59;
-
physic =98;
-
chemistry =100;
-
-
scanf("%d",&select);
-
if ( select==1)
-
{
-
printf("the math is:%f\n",math);
-
}
-
else if (select==2)
-
{
-
printf("the chinese is:%f\n",chinese);
-
}
-
else if (select==3)
-
{
-
printf("the physic is :%f\n",physic);
-
}
-
else if (select==4)
-
{
-
printf("the chemistry is:%f\n",chemistry);
-
}
-
else
-
{
-
printf("the sum is:%f\n",sum);
-
}
-
return 0;
- }