Question: C. Comments on how to do it would be appreciated! 2. Problem B 2.1 Specification Write a C program to input a set of integers,

 C. Comments on how to do it would be appreciated! 2.

C. Comments on how to do it would be appreciated!

2. Problem B 2.1 Specification Write a C program to input a set of integers, store them in an array, find the maximum and minimum values of the set, and display those two values. 2.2 Implementation The program is named lab2b.c Allocate an array of size 100. The array size should be declared as a constant. Use a loop and scanf to read one integer at a time and place it into the array. The loop terminates when the input is a zero. Store the zero in the array as well (i.e., the last element of an array is always a zero). Display before each input the following prompt: Enter the next array element> Find the maximum and minimum values of the set of integers stored in the array (including the last element, which is a zero). Display the maximum and minimum values on the standard output, in that order and separated by a tab character 'It'. Assume that all inputs are valid and that the number of input integers is less than 100. 2.3 Sample Inputs/Outputs indigo 360 lab2b Enter the next array element>10 Enter the next array element>2 Enter the next array element>-34 Enter the next array element>15 Enter the next array element>-20 Enter the next array element> 15 -34 indigo 361 & lab2b Enter the next array element>-100

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!