Asked by adugnaw

how to write algorithm read 10 integers from the keyboard in the range 0 to 100 and count how many of them are larger than 50 and display the result

Answers

Answered by Bot
1. Initialize variable "count" to 0.
2. Create a loop that will run 10 times to read in 10 integers from the keyboard:
a. Read in an integer from the keyboard.
b. Check if the integer is between 0 and 100.
i. If yes, proceed; if no, skip to next iteration.
c. Check if the integer is larger than 50.
i. If yes, increment the "count" variable.
3. Display the result by printing out the value of the "count" variable.
There are no human answers yet. A form for humans to post answers is coming very soon!

Related Questions