Well this is a little more complicated that I said in the first post.
This is a "game" where booth players choose their initial positions and booth players have a "cannon" to shoot the opponent.
To shoot, the players have to choose the angle and the velocity, and the movement are made acording the Equations of Motion
The initial X and initial Y are choosen in the beggining of the game(...)
Code:
do {
do {
printf("\n|+++++++++|\n");
printf("|Player 1|\n");
printf("|+++++++++|\n");
printf("\n->Angle:");
scanf("%f", &angle_1);
printf("\n->Velocity:");
scanf("%f", &v_initial_1);
angle_radians1=(angle_1*M_PI)/180;
for(t=0.1;t<=3.0;t=t+0.1) {
x_1=x_initial_1+(v_initial_1*cos(angle_radians1)*t);
y_1=y_initial_1+(v_initial_1*sin(angle_radians1)*t)+0.5*(g*(t*t));
if (x_1<0 || x_1>1000 || y_1<0 || y_1>1000) {
printf("OUT OF LIMITS");
}
printf("\nTo t=%.2f the position is X=%.0f and Y=%.0f\n", t,x_1,y_1);
}} while (and don't know what to put here);
do {
printf("\n|+++++++++|\n");
printf("|Player 2|\n");
printf("|+++++++++|\n");
printf("\n->Angle:");
scanf("%f", &angle_2);
printf("\n->Velocity:");
scanf("%f", &v_initial_2);
angle_radians2=(angle_2*M_PI)/180;
for(t=0.1;t<=3.0;t=t+0.1) {
x_2=x_initial_2+(v_initial_2*cos(angle_radians2)*t);
y_2=y_initial_2+(v_initial_2*sin(angle_radians2)*t)+0.5*(g*(t*t));
printf("\nTo t=%.2f the position is X=%.0f and Y=%.0f\n", t,x_2,y_2);
}} while (and don't know what to put here);
} while (and don't know what to put here)
..
_________________________
A lot of errors I know because I am still experimenting, this is just for you to understand the idea.