I am facing an error, that is a presentation error. Being a beginner to c++ , I am stuck on the following question:
Two cars (X and Y) leave in the same direction. The car X leaves with a constant speed of 60 km/h and the car Y leaves with a constant speed of 90 km / h.
In one hour (60 minutes) the car Y can get a distance of 30 kilometers from the X car, in other words, it can get away one kilometer for each 2 minutes.
Read the distance (in km) and calculate how long it takes (in minutes) for the car Y to take this distance in relation to the other car.
Input:
30
Output:
60 minutos (minutes in portuguese)
Now, upon submitting the code it says presentation error. Could someone help me find a solution to this error. Thank you in advance.
My code:
#include <iostream>
using namespace std;
int main(){
int Y;
cin >> Y;
cout << 2*Y << " minutos " << endl;
return 2*Y;
}