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.
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.