Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

calculate how many liters would be needed

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    float spentTime,kmH , carSpeed(12);
    cin >> spentTime >> kmH;
    cout.precision(3);
    cout << fixed << (spentTime * kmH) / carSpeed << endl;
    
    return 0;
}
 
PREVIOUS NEXT
Tagged: #calculate #liters #needed
ADD COMMENT
Topic
Name
9+8 =