Asked by Themba
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.
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
Answered by
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.
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.
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.