26.5k views
3 votes
I need help writing this pseudocode

I need help writing this pseudocode-example-1

1 Answer

5 votes

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

User Thewayup
by
5.6k points