//Matthew Final Program
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
const double g=32.2;//acceleration due to gravity
const double k=0.158;//air drag constan
void inputValues(double& v, double& A);
double xcalc(double v, double A);
double ycalc(double v, double A);
double tcalc(double v, double A);
int main(){
cout<<"Take off angle:"
cout<<"Take off speed:"
cout<<"\n";
cout<<"time(s)"<<"x-distance(ft)"<<"y-distance(ft)"<<endl;
cout<<tcalc(v,A)<<" "<<xcalc(v,A)<<" "<<ycalc;
return 0;
}
void inputValues(double& v, double& A){
cout<<"Matthew Cibulka\n";
cout<<"Please enter the take off speed in mph:\n";
cin>>v;
cout<<"Please enter the take off angle in degrees:\n";
cin>>A;
return;
}
You don't know the difference between degrees and radians. cos() and sin() require the angle in radians, but your input is asking for one in degrees.
t (time) is an independent variable, not a function of v and A. At a rough guess you would be outputting a table of values at equal increments in time.
Your formulae for x and y appear to be correct for a linear drag force, but they are heavily overbracketed and difficult to read. x should obviously NOT be set within a while loop. It's just evaluated once at that particular value of t.
You will need to pass time t as argument to both xcalc and ycalc.
You have plenty of prompts, but no input statements in main. You need to actually call inputValues() there. After that, I expect that you will need a loop over times, but I don't know what your assignment asks.
I have no intention of looking at the external mail link you provide and I suspect most other forum users would think twice, given the URL.
When I try to compile your code I get four compilation errors. I've been out of school for a long time but when I was there, several profs would give zero points for a program that didn't compile :(.