Help with C plz

Status
Not open for further replies.

Stiks

Solid State Member
Messages
17
Ok for my class I have to make a program that calculates the time a projectile is in the air at a certain velocity and height. So basically the user enters the height and velocity and my prog is suppose to give the time. Anyway im pretty much done however when I compile it it gives me 2 errors:


1. In function 'main':

2. error: parse error before "time"


I dont know how to fix either, but im specially confused by the second one.

this is what the line that parse error is occuring:

time = distance / velocity * cos(theta)

thats all that is on that line and it says its before time the only thng i did before time was tab over so i dont know what the problem is. By the way this is the equation to the problem im suppose to solve.
 
We could use some more context to help you out... Post all your code, or at least all the code in the function that's giving the error. And also post the language and compiler.
 
Post more code, you are not missing a semicolon off the line above are you? have you defined time beforehand?
 
Status
Not open for further replies.
Back
Top Bottom