cm74usap2j62s
cm74usap2j62s cm74usap2j62s
  • 13-08-2018
  • Computers and Technology
contestada

I need help writing this pseudocode

I need help writing this pseudocode class=

Respuesta :

tonb
tonb tonb
  • 13-08-2018

The flowchart gives most of the solution, you only have to translate the loop to something like a while() { ... } structure:

X=0

input num

while (num > 5) {

ouput num

X = X + num

num = num + 2

}

output X

If you run this with num = 8, it would print:

8

6

14

Answer Link

Otras preguntas

graph the set of points. which model is most appropriate for the set? (–2, 10), (–1,1), (1, 1), (2, 10) quadratic exponential linear
how much money has to be invested at 4.3% interest compounded continuously to have 19,000 after 16 years??
Thomas paine argued in common sense that
How does resistance training prevent osteoporosis?
The area of a triangle is 24 square inches. What is the height of the triangle if the base length is 6 inches?A)4B)8C)18D20
T or f Over-the-counter (OTC) medicines are those that can be purchased without a doctor's authorization.
who established a haven for Quakers in America
Drinking alcohol on an empty stomach can cause you to get drunk faster. true or false.
When constructing perpendicular lines with a compass and straightedge, how should you start the construction?
the skydiver has a forward velocity of 40 m/s, After two second, what is the skydivers forward and downward velocity?