Hello, I am writing a code that will estimate an objects distance when launched from a canon at a set speed, with variable angle of canon and the what distanced the ball traveled at a specific time.
This is my code:
//File: Trajectory distance. cpp
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
const float g = 9.8, v = 80; // g is the force of gravity and Vo is the intial speed in meters/sec the object is launched.
int t; // t would be the time so that you would know how far it traveled in that many secs.
float y, a, x; // a is the angle the canon is set.
When I give the equation for (x) an error is under the (v) saying that I need to add an integral or enum type. I am not understanding what they mean by that so can anyone please give me a better understand in how I need to approach this?