#include<stdio.h>
void main()
{ float x,y;
printf(“please input the x:\n”);
scanf("%f",&x);
if(x<1)
printf("%f",y=x);
else if(x>=1&&x<10)
printf("%f",y=2x-1);
else if(x>=10)
printf("%f",y=3x-1); }
有如下函数: x (x<1) y= 2x-1 (1<=x<10) 3x-1 (x>=10)
最新推荐文章于 2022-12-04 13:36:24 发布