Question

Write a pseudocode for the following scenario.
You are to continue inputting numbers which may be either positive or negetive from a keyboard until a number of zero is entered. Count the number of positive numbers entered. This sum must be printed out at the end of the program.

Answers

MathMate
You can proceed with something simple like this, add more details as required:

Pseudocode CountPositive
integer totalPos, number
Begin loop
input number
if number>0 then totalPos <- totalPos + 1
loop while number <> 0
print totalPos

Add what you need to satisfy all requirements.

Related Questions