I'm not sure what is causing these. I looked it up and since they are both directed to line 1 of my code, I figure "# include" list may be missing something or in the wrong order. Has anyone had this problem? Write your question here.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
#include <iomanip>
#include <cmath>
#include <cstdlib>
#include <ctime>
usingnamespace std;
constdouble pi = 3.14159265;
constdouble grav = 9.8; // Earth gravity (m/s^2)
// Given time, angle, velocity, and gravity
// Update x and y values
void Trajectory (double t, double a, double v, double& x, double& y)
{
x = v * t * cos (a);
y = v * t * sin (a) - 0.5 * grav * t * t;
return;