carethegymnast1538 carethegymnast1538
  • 25-07-2020
  • Computers and Technology
contestada

What will be displayed if code corresponding to the following pseudocode is executed? Set Number = 4 Repeat Write 2 * Number Set Number = Number + 2 Until Number = 8

Respuesta :

thepingu
thepingu thepingu
  • 25-07-2020

Answer:

8

12

Explanation:

I made the code a bit easier to understand then worked out how it would go. Here's what I did.

number = 4

repeat until number = 8:

   write 2 * number

   number = number + 2

Following this itenary, we have, the system first writes "8" as it multipled 4 by 2. Number is now equal to 6.

Next repetition, the system writes "12" as it multipled 6 by 2. Now, number = 8. The proccess now stops as number is now equal to 8.

Answer Link

Otras preguntas

WHY did the changes to the atomic model happen
How exactly would I have to check my work for -x^2 = -36? The answer is 6 right?
Please help me with this assignment, I will reward 100 points for an honest and fair answer.
if you spent $24.81 with a 4% taxes how much is it
Areas with the lowest population density tend to be found in A) urban areas. B) rural areas. C) coastal areas. D) suburban areas.
Prince Henry the navigator of Portugal captured the city of Ceuta in the 15th century where was Ceuta located?
in the reading "The Chrysanthemums" what does Elisa do after the stranger leaves
What proportion of a normal distribution is located between z = 0 and z = +1.50?​ ​0.4332 ​0.8664 ​0.0668 ​0.9332?
Describe the process that causes movement of the continents.
what is the difference between the pakicetus and the ambulocetus?