I'm pretty new at programming, so I'm not sure if it's called an array exactly, but I want to print my output so it does the following:
The ball strikes at:
x m
b m
y m
So far I have written a piece of my code in a forloop which follows (keep in mind that this is a small piece of a bigger program):
Code:
for(i = 1; i<=num_hits; i++)
{
points = (double)d_distance*cos(theta*(M_PI/180))*i;
printf("The ball will hit the lower wall at the following point %.3lfm\n", points);
}
Mine prints out, of course like
The ball will hit the lower wall at the following point: x m
The ball will hit the lower wall at the following point: y m
The ball will hit the lower wall at the following point: z m