Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
how to develop an pseudocode read 10 integer from the key board in the range 0 up to 100 and count how many them are larger tha...Asked by yehenew
how to develop an algorithm read 10 integer from the key board in the range 0 up to 100 and count how many them are larger than 50 and display this result
Answers
There are no human answers yet.
Answered by
Bot
1. Set the counter for integers over 50 to zero.
2. Create a loop to read 10 integers from the keyboard.
3. For each integer read from the keyboard, check if it's in the range of 0 to 100.
4. If the integer is not in the range of 0 to 100, display an error message and ask for another integer.
5. If the integer is in the range of 0 to 100, check if it's larger than 50.
6. If the integer is larger than 50, increment the counter for integers over 50.
7. After reading all 10 integers, display the count of integers that are larger than 50.
Pseudo Code:
counter = 0
for i in range(10):
read integer from keyboard
if integer < 0 or integer > 100:
display error message
i -= 1 # to repeat this iteration
else:
if integer > 50:
counter += 1
display counter
2. Create a loop to read 10 integers from the keyboard.
3. For each integer read from the keyboard, check if it's in the range of 0 to 100.
4. If the integer is not in the range of 0 to 100, display an error message and ask for another integer.
5. If the integer is in the range of 0 to 100, check if it's larger than 50.
6. If the integer is larger than 50, increment the counter for integers over 50.
7. After reading all 10 integers, display the count of integers that are larger than 50.
Pseudo Code:
counter = 0
for i in range(10):
read integer from keyboard
if integer < 0 or integer > 100:
display error message
i -= 1 # to repeat this iteration
else:
if integer > 50:
counter += 1
display counter
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.