/* Simple program to read in number */ /* Really just demonstrates pointers*/ #include using namespace std; #define pi 3.141592653505 void read_start_vals(float *x, float*y,float *v, float *theta) { /* We use pointers here, because we are changing the variable's value and sending that back to the other routine */ /* If we do not use pointers here, we will only change the values of x,y,v,theta within the subroutine here */ cout <<"What is the initial value of x in m?\n"; cin >> *x; cout <<"What is the initial value of y in m?\n"; cin >> *y; cout <<"What is the initial value of theta in degrees?\n"; cin >> *theta; *theta=*theta*pi/180.0; /*This is to convert theta into radians, since C/C++ does trig in rads */ cout <<"What is the initial value of v in m/s?\n"; cin >> *v; cout << "For x, the memory value is" << x << "and the actual value is " <<*x <