URI Online Judge Solution | 1017 Fuel spent

Solution:
Here is the given hint is
“the amount of liters of fuel spent on a trip, using a car that does 12 Km/L”
and “This way you can get distance”
And I have to take input spent 10 hours and average velocity 85km/h so the formula for how many litre fuel spent in this path is c=85*10/12 We actually got this by using unitary method 🙂

#include<iostream>
#include<cstdio>
int main()
{
    double a,b,c;
    scanf("%lf\n%lf",&a,&b);
    c=(a*b/12);
    printf("%.3lf\n",c);
    return 0;
}

 

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published. Required fields are marked *