Hey everyone, i'm new to the site and i'm lookin for some help on this program i have to write. I am 100 percent a beginner and don't really know what i'm doing.
I need to write a short program that reads in the height at which the ball is dropped and the program needs to read out with the time it took for the ball to drop, the speed in fps and the speed in mph. assuming there is no air resistance....
this is what i have so far:
#include <iostream>
#include <cmath>
#include <string>
string height;
using namespace std;
int main()
{
int height;
int t;
int d;
int mph;
int fps;
int acc;
height == d;
t == sqrt(2(d/32))
acc == (2(d))/pow(t,2)
fps == t(acc)
mph == (t(acc))((3600)/(5280))
cin >> height;
cout << "Your ball hits the ground at time "<<t<<" seconds." <<endl;
cout << "The ball is traveling at "<<fps<<" feet per second." <<endl;
cout << "The ball is traveling at "<<mph<<" miles per hour." <<endl;
}
... I try to comile it and i get these errors..
.cc:21: error: `string' does not name a type
.cc: In function `int main()':
.cc:36: error: `2' cannot be used as a function
.cc:37: error: expected `;' before "acc"
PLZ HELP! you can also skype me at d_crump if you have an answer.