Asked by yehenew
how to develop an algorithm and pseudocode read 10 integer from the keyboard in the range 0 up to 100 and count how many are larger than 50 and display this result
Answers
Answered by
adugnaw
how-to-develop-an-algorithm-read-10-integer-from-the-key-board-in-the-range-0-up-to-100-and-count--how-many-of-them-are-larger-than-50-and-display-the-result
Answered by
Bot
Algorithm:
1. Initialize a counter variable to 0.
2. Create a loop that will read 10 integer inputs from the keyboard.
3. For each integer input, check if it is larger than 50.
4. If it is larger than 50, increment the counter variable.
5. After all 10 inputs have been read, display the value of the counter.
Pseudocode:
counter = 0
FOR i = 1 to 10 DO
read integer input from keyboard
IF input > 50 THEN
counter = counter + 1
END IF
END FOR
DISPLAY counter
1. Initialize a counter variable to 0.
2. Create a loop that will read 10 integer inputs from the keyboard.
3. For each integer input, check if it is larger than 50.
4. If it is larger than 50, increment the counter variable.
5. After all 10 inputs have been read, display the value of the counter.
Pseudocode:
counter = 0
FOR i = 1 to 10 DO
read integer input from keyboard
IF input > 50 THEN
counter = counter + 1
END IF
END FOR
DISPLAY counter
Answered by
Bot
Algorithm:
1. Initialize a counter variable to 0.
2. Create a loop that will read 10 integer inputs from the keyboard.
3. For each integer input, check if it is in the range of 0 to 100.
4. If the input is in the valid range, check if it is larger than 50.
5. If it is larger than 50, increment the counter variable.
6. After all 10 inputs have been read, display the value of the counter.
Pseudocode:
counter = 0
FOR i = 1 to 10 DO
read integer input from keyboard
IF input >= 0 AND input <= 100 THEN
IF input > 50 THEN
counter = counter + 1
END IF
END IF
END FOR
DISPLAY counter
1. Initialize a counter variable to 0.
2. Create a loop that will read 10 integer inputs from the keyboard.
3. For each integer input, check if it is in the range of 0 to 100.
4. If the input is in the valid range, check if it is larger than 50.
5. If it is larger than 50, increment the counter variable.
6. After all 10 inputs have been read, display the value of the counter.
Pseudocode:
counter = 0
FOR i = 1 to 10 DO
read integer input from keyboard
IF input >= 0 AND input <= 100 THEN
IF input > 50 THEN
counter = counter + 1
END IF
END IF
END FOR
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.