Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
339 B
3
Indexable
Never
#include <iostream>
using namespace std;

int main() {
   double viteza;
   cout << "Introdu viteza trenului (in km/h): ";
   cin >> viteza;

   double timp = 60 / viteza; // timpul in ore
   timp *= 60; // convertim timpul in minute

   cout << "Trenul va ajunge la Ploiesti in " << timp << " minute." << endl;
   return 0;
}