114k views
5 votes
Write a pseudocode that prompts the user to keep read numbers until 0 entered, and find how many of those numbers are odd and how many are even

1 Answer

0 votes

Start

Read number n.

When n = 0 go to End.

Compute r = n / 2,

If decimal part of r = 0 add 1 to Even-count

else add 1 to odd-count

endif

Go to Start

End

Print Even count , Odd count

Stop.

User Israteneda
by
6.8k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.