17.2k views
2 votes
Please I need help to create an IPO chart for this program “Input a list of positive numbers, terminated by 0, into an array numbers [].Then display the array and the largest and smallest number in it.”

User Zsmaster
by
6.6k points

1 Answer

1 vote

Input :

*Processing*

Output :

An array full of numbers which is terminated by 0.

Algorithm:

1. **Start

2. **Take an array, max, and min as variables.

3. **Get the numbers from the user.

4. **Initialize the max and min variables as a[0].

5. **Now, check if max>a[i]. If true, reinitialize max=a[i].

6. **Check if min<a[i]. If true, reinitialize min=a[i].

7. **Print max and min.

8. **Stop

User Mwk
by
5.6k points