谭浩强第四版,第四章课后第6题

 

#include<stdio.h>
int main(){
float x,y;
printf("please enter:\n");
scanf("%f",&x);
if(x<1){
y=x;
}
else if(1<=x&&x<10){
y=2*x-1;
}
else if(x>=10){
y=3*x-11;
}
printf("%f\n",y);
return 0;
}

猜你喜欢

转载自blog.csdn.net/weixin_37536336/article/details/86009585