Question: Instruction: Modify the code so that the variables and are entered by the user on the keyboard. 1. Move the code from lines 16 and
Instruction: Modify the code so that the variables
and are entered by the user on the keyboard. 1. Move the code from lines 16 and 17 to a function called fEnterdata(....). that returns v0x and v0y.
2. Move the code from the releases 18 to 26 inclusive to a function called fShowInitials(....)
3. Move the code of lines 28 to 40 inclusive ti a function called fComputerTrajector(....)
4. Move the code from lines 46 to 110 including a function called fGenerateGraphic (....).
as always, the standard report should be use with relevant chapters of intriduction and algorithm,
flow chart, source code and photo of an example of execution.
The code a little more visible
Do the program following the instruction the program is in the photo.
Please Closed the question.
C cd 7/Code Blocks: Project Build Options Linker settings Other linker options: add-Igdi32 #define WIN32_WINNT Ox0500 #include "windows.h" //#include "Wingdi.h" #include #include #include Spo using namespace std; #define PI 3.14 #define NMAX 1000 int main({ del double G 9.81, ang=53,v0-10, vx,v@y; //Inicializar el angulo y la velocidad inicial vox - VO*cos(ang*PI/180); //Velocidad inicial horizontal voy - vosin(ang "PI/180); //Velocidad inicial vertical printf ("Initial speed ve: %.2f. Angle : %.2f ", vo, ang); printf ("vex: %.2f ", vex); printf ("vy: %.2f ", voy); double tFinal = 2*v@y/G; //tiempo de la bala en el aire double yMax - v@y*tFinal/2-0.5*G*tFinal/2*tFinal/2; printf ("tFinal: %.2f ",tFinal); double Ts=0.1; int N = (int) (tFinal/Ts); printf ("Number of measures: %d ", (N+1)); double x[NMAX+2],y[NMAX+2], [NMAX+2); printf ("t: secs. xpos. ypos. Vx. vy "); for (int n = 0; n #include #include using namespace std; #define PI 3.14 #define NMAX 1000 int main() { double G=9.81, ang=53, v0=10, v0x, voy; //Inicializar el angulo y la velocidad inicial vox - v0*cos(ang*PI/180); //Velocidad inicial horizontal voy = vo*sin(ang*PI/180); //Velocidad inicial vertical printf ("Initial speed vo: 8.2f. Angle : %.2f ",vo, ang); printf ("vox: 8.2f ", v0x); printf ("v0y: %.2f ", voy); double tFinal = 2*v0y/G; //tiempo de la bala en el aire double yMax = vOy*tFinal/2- 0.5*G*tFinal/2*tFinal/2; printf ("tFinal: %.2f ",tFinal); double Ts=0.1; int N = (int) (tFinal/Ts); printf ("Number of measures: %d ", (N+1)); double x[NMAX+2),Y[NMAX+2), t[NMAX+2); printf ("t: secs. xpos. ypos. Vx. vy "); for (int n = 0; n #include #include Spo using namespace std; #define PI 3.14 #define NMAX 1000 int main({ del double G 9.81, ang=53,v0-10, vx,v@y; //Inicializar el angulo y la velocidad inicial vox - VO*cos(ang*PI/180); //Velocidad inicial horizontal voy - vosin(ang "PI/180); //Velocidad inicial vertical printf ("Initial speed ve: %.2f. Angle : %.2f ", vo, ang); printf ("vex: %.2f ", vex); printf ("vy: %.2f ", voy); double tFinal = 2*v@y/G; //tiempo de la bala en el aire double yMax - v@y*tFinal/2-0.5*G*tFinal/2*tFinal/2; printf ("tFinal: %.2f ",tFinal); double Ts=0.1; int N = (int) (tFinal/Ts); printf ("Number of measures: %d ", (N+1)); double x[NMAX+2],y[NMAX+2], [NMAX+2); printf ("t: secs. xpos. ypos. Vx. vy "); for (int n = 0; n #include #include using namespace std; #define PI 3.14 #define NMAX 1000 int main() { double G=9.81, ang=53, v0=10, v0x, voy; //Inicializar el angulo y la velocidad inicial vox - v0*cos(ang*PI/180); //Velocidad inicial horizontal voy = vo*sin(ang*PI/180); //Velocidad inicial vertical printf ("Initial speed vo: 8.2f. Angle : %.2f ",vo, ang); printf ("vox: 8.2f ", v0x); printf ("v0y: %.2f ", voy); double tFinal = 2*v0y/G; //tiempo de la bala en el aire double yMax = vOy*tFinal/2- 0.5*G*tFinal/2*tFinal/2; printf ("tFinal: %.2f ",tFinal); double Ts=0.1; int N = (int) (tFinal/Ts); printf ("Number of measures: %d ", (N+1)); double x[NMAX+2),Y[NMAX+2), t[NMAX+2); printf ("t: secs. xpos. ypos. Vx. vy "); for (int n = 0; n