#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
void fallingDistance();
int main()
{
cout<< " I will display the the distance for seconds 1-10 . \n\n";
fallingDistance();
return 0;
}
void fallingDistance ()
{
for (t=1; t<=10; t++)
{
double distance = ((.5)(9.8)(t)(t));
cout<< distance << "m. \n\n";
}
}
I don't see whats wrong ..
Last edited on
for (int t=1; t<=10; t++)
I did that and still got the error.
double distance = .5 * 9.8 * t * t ;
Parentheses don't mean multiply.
Thank you so much I completely forgot that.