#include <iostream>
using namespace std;
int main(){
int relative_speed = 72 - 54;
float distance;
cout<<"Enter number of seconds taken to pass the train: ";
int x; cin>>x;
cout<<"Length of the good train: "<<(float) relative_speed*1000/3600 * x<<" meters.\n";
return 0;
}
Comments
Leave a comment