Question: #define _win32_WINT 0x0500 #include windows.h //#include Wingdi.h #include #include #include using namespace std; #define PI 3.14 #define NMAX 1000 int main() { ////////////////////////////////////////////////////////////////////////////////////// double G

#define _win32_WINT 0x0500 #include "windows.h" //#include "Wingdi.h" #include #include #include

using namespace std; #define PI 3.14 #define NMAX 1000 int main() {

////////////////////////////////////////////////////////////////////////////////////// double G = 9.81, ang = 53, v0 = 10, v0x, v0y; //Inicializar el angulo y la velocidad inicial v0x = v0 * cos(ang * PI / 180); //Velocidad inicial horizontal v0y = v0 * sin(ang * PI / 180); //Velocidad inicial vertical printf("Initial speed v0: %.2f. Angle : %.2f ", v0, ang); printf("v0x: %.2 ", v0x); printf("v0y: %2f ", v0y); double tFinal = 2 * v0y / G; //tiempo de la bala en el aire double yMax = v0y * 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

///////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////

cout

for (int i = 0; i

//Plot the(0,0) coordinate with 5 pixels to paint a bold point SetPixel(mydc, xmiddle, ymiddle, WHITE); //Plot 0,0 SetPixel(mydc, xmiddle - 1, ymiddle, WHITE); //Plot 0,0 SetPixel(mydc, xmiddle + 1, WHITE); //Plot 0,0 SetPixel(mydc, xmiddle, ymiddle - 1, WHITE); //Plot 0,0 SetPixel(mydc, xmiddle, ymiddle + 1, WHITE; //Plot 0,0

int pixel = 0, multip = 50; double xcur, ycur; for (int n = 0; n

// Plot 5 pixels per coordinate so it is bold on the screen SetPixel(mydc, (int)xcur, (int)ycur, WHITE); SetPixel(mydc, (int)xcur - 1, (int)ycur, WHITE); SetPixel(mydc, (int)xcur + 1, (int)ycur, WHITE); SetPixel(mydc, (int)xcur, (int)ycur - 1, WHITE); SetPixel(mydc, (int)xcur, (int)ycur + 1, WHITE);

//Plot each x unit in blue SetPixel(mydc, xmiddle + multip * n, ymiddle, BLUE); SetPixel(mydc, xmiddle + multip * n - 1, ymiddle, BLUE); SetPixel(mydc, xmiddle + multip * n + 1, ymiddle, BLUE); SetPixel(mydc, xmiddle + multip * n, ymiddle - 1, BLUE); SetPixel(mydc, xmiddle + multip * n, ymiddle + 1, BLUE);

//Plot eachy unit in blue if less than ymiddle if (rect.top + multip * n

//SetPixel (mydc,xmiddle,(int)ycur, BLUE); pixel += 10; }

ReleaseDC(myconsole, mydc); cin.ignore(); return 0; }

Instruction: The instruction is in the photo  #define _win32_WINT 0x0500 #include "windows.h" //#include "Wingdi.h" #include #include #include using
I need the program running and compiling

As you will see all the code is in the main function. Its final objective will be to move the code to different functions so that the main function can be divided into independent modules. These are the steps you should do: 1. Modify the code so that the variables and are entered by the user on the keyboard. Move the code from lines 16 and 17 to a function called internterData (....) that returns vox and voy. 2. Move the code from lines 18 to 26 inclusive to a function called fShowinitials (....). 3. Move the code from lines 28 to 40 inclusive to a function called fComputer Trajectory (....). 4. Move the code from lines 46 to 110 inclusive to a function called fGenerateGraphic (....). As always, you should use the standard report with the pertinent chapters of introduction and flowchart algorithm, source code and photo of an example of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!