Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a 10-15 line algorithm/pseudo-code that asks the user to input 2 numbers (called angle and speed). The algorithm then simulates the firing of
Write a 10-15 line algorithm/pseudo-code that asks the user to input 2 numbers (called angle and speed). The algorithm then simulates the firing of an arrow at that angle relative to the ground, at that launch speed (as in Figure 1). The algorithm then determines how far up the arrow goes, how far away the arrow lands, and how long it flies before landing. Then these 3 values are output to the screen. Include a check on the input data, and output an error message if the user provides a bad speed or angle. arrow angle Figure 1 ground
Step by Step Solution
There are 3 Steps involved in it
Step: 1
function main angle speed getInput if isValidangle speed flightData simulateFlightangle speed displayResultsflightData else displayError function getInput angle getUserInputEnter angle in degrees 090 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started