Header Ads

Header ADS

Solution of URI 1017::Fuel Spent

Before seeing the solution make sure that you have tried enough. Don’t copy the whole code, just find out the logic. If you feel any problemyou will inform me by comment.




#include <stdio.h>
int main ()
{
    int time,speed
;
    float liter;
    scanf("%d%d",&time,&speed);

    liter = ( time*speed ) / 12.0;

    printf("%.3f\n",liter);

    return 0;
}

No comments

Theme images by konradlew. Powered by Blogger.