1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Leto [7]
3 years ago
11

Write a computer program that computes the duration of a projectile’s flight and its height above the ground when it reaches the

target. As part of your solution, write and call a function that displays instructions to the program user. Note: Include functions in your program. Problem Constant G = 32.17 // gravitational constant Problem Inputs float theta // input - angle (radians) of elevation float distance // input - distance (ft) to target float velocity // input - projectile velocity (ft/sec) Problem Outputs float time // output - time (sec) of flight float height // output - height at impact
Computers and Technology
1 answer:
Citrus2011 [14]3 years ago
7 0

Answer:

#include <stdio.h> #define Gray 32.17 /* gravitational constant */ #include <math.h> /*cos definition*/ #define PI 3.14159265

int main(void) double Theta; /*input-angle(radians)of elevation*/ double Distance; /*input-distance (ft) to target */ double Velocity; /*input-projectile velocity (ft/sec)*/ double Time; /* output-time(sec) of flight*/ double Height; /*output-height at impact*/

printf("Enter Distance> "); scanf("%f", &Distance);

printf("Enter Radians> "); scanf("%f", &Theta);

printf("Enter Velocity> "); scanf("%f", &Velocity

Time = Distance / (Velocity * cos(Theta*PI/180.0) ) ;

Height = (Velocity *sin(Theta*PI/180.0)*Time) - Grav*(Time* Time) );

printf("The time of flight is %.3f seconds.\n", Time); printf("The height at impact is %.3f feets.\n", Height);

system("pause");

return (0);

You might be interested in
How do you implement instruction level parallelism
netineya [11]

Answer:

To obtain substantial performance enhancements, we must exploit ILP across multiple basic blocks.

Explanation:

8 0
3 years ago
What is the problem, if any, with the following code?The desired output is [3,19].
vfiekz [6]

Answer: You need a temporary variable to hold the value 3

Explanation:

So, aList[0] is 3 and aList[1] is 19, if it will be as it is you litteraly say to the compiler to change aList[0] to aList[1]  at this moment aList[0] is 19 and aList[1] also is 19 and if you try to change aList[1] to aList[0]  it will not change its value because they are the same.

You need temp variable to keep one of the values.

8 0
2 years ago
A circular copper disk of diameter D=10 cm rotates at frequency =1800 rev/min about an axis through its center and at right angl
MAXImum [283]

Answer:

Induced current is 0.226 A

Explanation:

To calculate potential difference we have

E =1/2Bomega*r2 =1/2*1*1800*3.14*0.05=141.3

putting values we get

the p.d is 141.3

7 0
3 years ago
Which type of software is created on user dimension​
Ratling [72]

Answer:

Application and system software is created on user dimension.

6 0
3 years ago
Learning from and working collaboratively with individuals is being literate in which area
solniwko [45]
I think it should be civic literacy
7 0
3 years ago
Read 2 more answers
Other questions:
  • What is the first stage of perception
    6·2 answers
  • If you plan on operating several applications at s time, the amount of RAM should be considered when purchasing a computer
    10·2 answers
  • Ray has to type an invoice using the QWERTY keyboard. Along with letters and numbers, he also has to insert the dollar sign. Whi
    13·1 answer
  • If 10 ft lb of torque is applied at gear A, then what is the output torque at gear D?
    15·1 answer
  • What tasks does google do?
    5·1 answer
  • Which social media post indicates your home may be unattended?
    10·1 answer
  • How much time per day does the average U.S. youth spend watching television, playing video games, or using a computer?
    8·1 answer
  • Emma lives in Pennsylvania, what climate does she live in?
    7·1 answer
  • Search..
    14·1 answer
  • Define two benefits to members of the community of replacing the printed copy with an online version.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!