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

An urn contains eight red balls, eight white balls, and eight blue balls, and sample of six balls is drawn at random without replacement. Compute the probabilit
Your objective should be simple, specific, and brief. true false
ABCD is a trapezoid with midsegment EF. If AB = 12, and CD = 24, what is the length of EF?
What is 248% as a mixed number?
What is similar about the Hebrew Bible and the Epic of Gilgamesh?
What is not generally considered a factor that led to the start of World War I? The various alliances among the major powers prior to the start of the War Th
A spacecraft's landing is cushioned by air bags. As it lands on Mars, the velocity of downward fall is 20 meters/second. Immediately after impact the v
what`s the biblical word for you (nominative)
1. What Anglo-Saxon value motivates the Geats to build a statue of Beowulf at the end of the poem? A. a pride in loyalty B. a taste for boasting C.
Which component in this mixture has the lowest density? A. glass. . B. water. . C. sawdust. . D. sand