Don't you want the cout statements to output the values of the variables, not a static value? Distance looks correct, the other two are just cout'ing "10.0 sec" or "60.0 feet/sec/sec". Also, you need a curly bracket at the very end of the program to close out main().
You are not displaying the actual variables in your cout statement you are hardcoding them in with the string you have entered.. You got the 3rd cout statement right with the distance variable included but you didn't include the other 2 variables in the previous cout statements.?
1 2 3 4
cout << "The time was: "<< time << "sec.\n";
cout << "The acceleration was: "<< acceleration << " feet/sec/sec.\n";
cout << "The distance traveled was: " << distance << "feet.\n";
It does work where it is located but I wouldn't say its in the right place because it looks messy. Try to group things together by their function...
Such as, try to group necessary variables on top. Group the output statements together
so like
1 2 3 4 5
cout << fixed << setprecision(2);
cout << "The time was: "<< time << "sec.\n";
cout << "The acceleration was: "<< acceleration << " feet/sec/sec.\n";
cout << "The distance traveled was: " << distance << "feet.\n";
Set precision works by limiting the number of decimal places to the specified value. So I set this at 2 ..so it will show 2 places to the right of the decimal.
Thank you soooo much!!! and im really sorry to bother you but i have 1 more question to ask. I've been looking around google and couldn't find the exact answer that im looking for. How would i code the shapes? im not talking about colums and rows but something like this:
(suppose to be arrow pointing up..)