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

How does the code of chivalry affect sir gawain in Sir Gawain and the Green Knight?
Someone helppppp pleasse
credit card A has an APR of 15.8% and an annual fee of $72, while credit card b has an Apr of 19.6% and no annual fee.
Effects of prosperity after world war 2
In 2/3 of a hour, workers had installed 2/5 of a foor. At the rate,what fraction of the flooring is finished after 1 hour?
Solve the formula for the perimeter of a rectangle with width W and length I for the length p=2w+2I
How would the colonists describe the King of England? A. A patriot B. A zealot C. A loyalist D. A tyrant
Read this excerpt from The Adventures of Robinson Crusoe: . . .I was very loth to sell [Xury], who had assisted me so faithfully in procuring my own [freedom].
Which type of van der walls force is responsible for holding polar molecules together? london dispersion dipole-dipole hydrogen bonding gravitational force?
Nitrogen-13 has a half-life of 10 minutes. how much of a 128 mg sample would remain after 20 minutes?