1. ## Suggestions?

I am looking for advice on anything in the code below which could be beneficial in some way. Anything that could be added or changed etc:
Code:
```/*A car and a train are both traveling toward a railroad crossing on a collision course.
The train is 1200 feet from the crossing and traveling at a constant speed of 40 feet per second.
The car is 1500 feet away and traveling at 55 feet per second.
Write a program to calculate and print each vehicles distance from the crossing at one-second intervals.
If the car gets to the crossing first, print "Made it."
If the train gets to the crossing first, print "Crash".
*/
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;

int main(int argc, char *argv[])
{
int Train_Distance = 1200, Car_Distance = 1500, Train_Speed = 40, Car_Speed = 55, Seconds_Passed = 0;
std::cout<< "The train and the car race to the cross the intersection. Which will win?"
<< endl << "Seconds Passed = " << Seconds_Passed
<< " Train Distance = " << Train_Distance << " feet"
<< " Car Distance = " << Car_Distance << " feet" << endl;
while(Train_Distance >= 0 && Car_Distance >= 0)
{
std::cout<< "Seconds Passed = " << ++Seconds_Passed
<< " Train Distance = " << (Train_Distance -= Train_Speed) << " feet"
<< " Car Distance = " << (Car_Distance -= Car_Speed) << " feet" << endl;
}
if(Train_Distance < Car_Distance) winner = "Crash.";
std::cout<< winner << endl;
std::cin.get();
return EXIT_SUCCESS;
}```

2. I don't see any major changes that you should make, but here are some things to think about:

Since you don't appear to be using anything from <cstdlib> other than EXIT_SUCCESS, I would remove that #include and just return 0.

You're already prefixing std:: to all your cout's, so you can either:
- Leave the using namespace std; as it is and change nothing.
- Change it to using std::endl;
- Remove the std:: before the cout's.
- Add std:: to the endl's and remove the using namespace std; line.

I would also add more whitespace to make it easier to read.

3. I'm not sure exactly what you're looking for. The code appears to work (I didn't run it), so there's nothing much you can do to semantically improve your code. I can suggest some very minor things though:

Code:
`using namespace std;`
It's a good idea to never use this line. While it doesn't matter for small test applications, it can cause you problems once you start dealing with bigger projects.

Code:
`     while(Train_Distance >= 0 && Car_Distance >= 0)`
If Train_Distance or Car_Distance is zero, why would you want to loop again?

Code:
```     string winner = "Made it.";
if(Train_Distance < Car_Distance) winner = "Crash.";```
This is a good place to use the ternary operator.
Code:
`string winner = (Train_Distance < Car_Distance) ? "Crash." : "Made it.";`

4. - Add std:: to the endl's and remove the using namespace std; line.
It's a good idea to never use this line. While it doesn't matter for small test applications, it can cause you problems once you start dealing with bigger projects.
Understood and fixed.

Code:
`while(Train_Distance >= 0 && Car_Distance >= 0)`
I used this because it give the desired results of printing the last passing second which shows the first vehicle has crossed the intersection. The first negative number. I am unaware of a better way to do so. Would be happy to hear suggestions.

...ternary operator
Interesting concept, google here I come.

Thank you both for your much appreciated feedback.