![makayladurham19](/avatars/32739.jpg)
makayladurham19
29.05.2021 •
Computers and Technology
An algorithm has been written in pseudocode to input 50 numbers and output the sum.
a. Find the error(s) in the pseudocode and suggest a correction.
b. Change the corrected pseudocode that you suggested in the solution above such that it doesn’t allow the user to enter any negative numbers. If a negative number is entered it should display an error message as well as ask for input again.
c. Dry run the solution you suggested in part b above and create a trace table for it. You may choose test data of your choice. (It should contain both positive and negative numbers)
d. Convert the solution you suggested in part b to its equivalent flowchart.
Solved
Show answers
More tips
- W Work and Career Secrets of a Super Supervisor: Proper Team Management...
- P Photography and Videography Understanding HDR: How It Works and Why You Need It...
- G Goods and services Which TV is better - LCD or Plasma?...
- S Sport How to Learn to Pull Up on Monkey Bars?...
- L Leisure and Entertainment Scrapbooking: What is it and Why is it Becoming More Popular?...
- C Computers and Internet Where did torrents.ru move to?...
- B Business and Finance Understanding Cash Flow: What It Is and How It Works...
- C Computers and Internet What Are Peers and Seeds in Torrenting?...
- H Health and Medicine 10 Simple Techniques on How to Boost Your Mood...
- G Goods and services How to Choose the Right High Chair for Your Baby?...
Answers on questions: Computers and Technology
- C Computers and Technology Carly will be going to college in 3 years. she anticipates that she will need $12,000 to pay for the first year. she currently has $2,900 in a savings account. without including...
- C Computers and Technology How do you write a program that will solve the quadratic equationax2+bx=c=0...
- C Computers and Technology How do you write a program that will solve the quadratic equationax2+bx=c=0 by telling the user to enter the coefficient a, b, and c and thenprint the roots of the equation....
- C Computers and Technology How do i fix the following program to include the user sinput of values?...
- C Computers and Technology How do you express this in c++? a=(b)^(c+x) x is a variable....
- C Computers and Technology How do i delete an existing file in vi editor, c language?...
- C Computers and Technology How can i convert a decimal number from the commandline to a binary (base 2) in c++? ?...
- C Computers and Technology How can domain, linking, lookup and weak be used in an e-commerce database? (edited) domain: entity describing a core business element of the database. linking: entity used...
- C Computers and Technology How automata theory relates with compiler constructions?...
- C Chemistry A gas expands from 285 mL to 789 mL at constant temperature. How much work is done by the gas (joules) if it expands against a constant pressure of 6.00 atm?...
Ответ:
a) h = 1/2 gt² b) 99 m/s c) 14.1 m/s
Explanation:
a) As the only force acting on the canister once released is gravity, as it is constant, we can use one of the kinematic equations, as follows:
h = h₀ + v₀t + 1/2a t²
As we are told that the canister is simply released, it means that v₀ =0.
If we choose the direction of the acceleration (downward) as positive ,and we select the height at which it was released as our origin, so h₀ =0, the final expression for height is as follows:
h = 1/2 g t²
b) Combining this equation with the expression of t, from the definition of acceleration as the rate of change of velocity, we arrive to this expression:
vf² - v₀² = 2 g h
As v₀ = 0, we have v₀ = √2.g.h = √2.9.8.500 m²/s² = 99 m/s
c) In order to be able to break the canister, impact speed must be larger than 100 m/s.
So, we can use the same equation as above, putting vf=100 m/s, and solving for v₀, as follows:
v₀² = vf² - 2.g.h = 100² m²/s² - 2.9.8.500 m²/s² = 200 m²/s²
v₀ = √200 m²/s² = 14.1 m/s
For any value of v₀ just barely larger than this, the canister will be broken.