新手求助:为什么z=z+5的代码不运行呢
查看原帖
新手求助:为什么z=z+5的代码不运行呢
894033
wuxiangtianbei楼主2022/11/27 12:32
#include<stdio.h>
#include<math.h>
int main()
{
double x,z;
char c;
scanf("%lf%c",&x,&c);
{
if (x<=1000)z=8;
else if(x>1000) z=8+ceil((x-1000)/500)*4;
}
if (c=='y') z=z+5;
printf("%.0f",z);
}
2022/11/27 12:32
加载中...