View Code of Problem 69

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

Double click to view unformatted code.


Back to problem 69