To find the maximum and minimum numbers from 10 given numbers in a flowchart, you can follow these steps:
1. Start the flowchart.
2. Initialize two variables, max and min, to store the maximum and minimum numbers respectively. Set them both to the first given number.
3. Read the first given number and assign it to a variable, num.
4. Compare num with max and min:
a. If num is greater than max, update max with the value of num.
b. If num is less than min, update min with the value of num.
5. Repeat steps 3 and 4 for the remaining 9 given numbers.
6. After comparing all the numbers, the maximum number will be stored in the variable max and the minimum number will be stored in the variable min.
7. Display the values of max and min.
8. End the flowchart.
Here is a flowchart representation of the above steps to find the maximum and minimum numbers from 10 given numbers:
Start --> Initialize max and min to first given number --> Read first given number and assign it to num --> Compare num with max and min --> Update max and min if necessary --> Repeat for remaining 9 given numbers --> Display max and min --> End
how find the maximum and the minimum numbers from 10 given numbers in a flowchart?
1 answer