main()
{    
     float x,y;
     printf("x=");
     scanf("%f",&x);
     if(x<0)  y=0;
     else
         if(x<10)  y=x;
         else
             if(x<20) y=10;
             else y=-0.5*x+20;
       printf("y=%f,",y);
}