24 lines
379 B
C

#include <stdio.h>
int main(void)
{
double x;
double y;
while (1)
{
printf("input:");
scanf("%lf",&x);
if (x<1)
{
y = x;
}
else if (x>=1 && x<10)
{
y = 2*x-1;
}
else if (x>=10)
{
y = 3*x-11;
}
printf("output: %10.5lf\n",y);
}
}