C++ Programming, having trouble programming finding velocity and distance : <p>Hey I'm a beginner taking an intro to C++ class, and this is my first assignment. I posted this a couple of days ago but I still am somewhat lost. I have to use the formulas: d=v0*t + 1/2*g<em>t^2, and v= v0 + g</em>t. where v0 stays constant at 0 and g also stays constant at 9.807 m/s^2. I keep getting one error which is "expected unqualified-id before "{" token" on the first { and cannot seem to fix them, and im sure this code is incorrect, so can you help me figure this out?</p>

<pre><code>#include &lt;cstdlib&gt;
#include &lt;iostream&gt;
#include &lt;math.h&gt;

using namespace std;

const float GRAVITY = 9.807, INITIALVELOCITY = 0;
int seconds;


{
cout &lt;&lt; "Please enter the time in seconds." &lt;&lt; endl;
cin &gt;&gt; seconds;
}  //end function Time

int main(int argc, char *argv[])
{
float distance, velocity, seconds;
void getSeconds (void);

cout.setf (ios::fixed,ios::floatfield);

cin &gt;&gt; seconds;
while (seconds &gt; 0) {

distance = INITIALVELOCITY * seconds + (0.5 * GRAVITY * pow(seconds, 2));
velocity = INITIALVELOCITY + (GRAVITY * seconds);

cout.precision (0);
cout &lt;&lt; endl &lt;&lt; "WHEN THE TIME IS" &lt;&lt; seconds &lt;&lt; "SECONDS THE DISTANCE"
"TRAVELED IS" &lt;&lt; distance &lt;&lt; "METERS THE VELOCITY IS" &lt;&lt; velocity &lt;&lt;
"METERS PER SECOND.";
cout. precision(1);
cout&lt;&lt; seconds &lt;&lt; distance &lt;&lt; velocity &lt;&lt; endl &lt;&lt; endl;

}

system ("PAUSE");
return EXIT_SUCCESS;
} //end main
</code></pre>
