Solution | URI Online Judge | 1017 Fuel Spent

URI Online Judge | 1017

Fuel Spent

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
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.
Input SampleOutput Sample
10
85
70.833
2
92
15.333
22
67
122.833


সল্যুশন্সঃ 
#include<iostream>
#include<iomanip>

using namespace std;

main()
{
    float X, Y;

    cin >> X;
    cin >> Y;
    cout << fixed;

    cout << setprecision(3) << (X*Y)/12 << endl;

    return 0;
}


আলোচনাঃ 
কোনো টপিক না বুঝলে অবশ্যই কমেন্টস করবেন। কোড কপি পেষ্ট না করে আগে বুঝুন দেন নিজে নিজে করুন। কোডিং এর মজা টা বুঝবেন।

Comments

Popular posts from this blog

Solution - Codeforces Problem 327B - Hungry Sequence

Solution - Timus Problem 1293. Eniya

Solution - Timus Problem 1409. Two Gangsters