#include
#include
int main(void)
{float x,y;
printf("please input a number\n")
scanf("%f\n",&x);
if(x<=0)
y=x+5;
else
{if(x>=7)
y=2x-1;
else
y=2x-sqrt(x);
}
printf("y=%f\n",y)}
return0
#include<stdio.h>
#include<math.h>
int main(void)
{
float x,y;
printf("please input a number\n");
scanf("%f",&x);
if(x<=0)
y=x+5;
else
{
if(x>=7)
y=2*x-1;
else
y=2*x-sqrt(x);
}
printf("y=%f\n",y);
return 0;
}