URI ONLINE JUDGE SOLUTION 1017 - Fuel Spent

Problem

Little John wants to calculate and show the amount of spent fuel liters on a trip, using a car that does 12 Km/L. For this, he would like you to help him through a simple program. To perform the calculation, you have to read spent time (in hours) and the same average speed (km/h). In this way, you can get distance and then, calculate how many liters would be needed. Show the value with three decimal places after the point.

Input

The input file contains two integers. The first one is the spent time in the trip (in hours). The second one is the average speed during the trip (in Km/h).

Output


Print how many liters would be needed to do this trip, with three digits after the decimal point.

sample input output


Solution

#include<stdio.h>
int main()
{
    int time,speed;
    double fuel;
    scanf("%d%d",&time,&speed);
    fuel=(time*speed)/12.0;
    printf("%0.3lf\n",fuel);
    return 0;

}

Comments

Popular posts from this blog

URI ONLINE JUDGE SOLUTION 1021 - Banknotes and Coins

URI ONLINE JUDGE SOLUTION 1040 - Average 3

URI ONLINE JUDGE SOLUTION 1036 - Bhaskara's Formula