Question: main(void) { // Declare variables char letter='z'; // letter choice of user int length; // length of array int i; // loop control variable printf(Please

main(void) { // Declare variables char letter='z'; // letter choice of user int length; // length of array int i; // loop control variable printf("Please enter the length of your array: "); scanf("%d", &length); int data [length]; // data array to process while (letter != 'q') { // Create menu of options for user printf("Please enter a,b,c,d,e, or f to process array. "); printf("Enter 'q' to quit. "); printf("a. Assign values to array "); printf("b. Sum values in array "); printf("c. Compute average of array values "); printf("d. Find the max value in the array "); printf("e. Find the min value in the array "); printf("f. Create a copy of the array "); printf("q. Quit "); // Read in user's choice scanf(" %c",&letter); switch(letter) { case 'a': printf("You selected a. "); printf("Please enter values for the array. "); for (i = 0; i < length; i++) { printf("Enter next value: "); scanf("%d", &data[i]); } break; case 'b': printf("You selected b. "); printf("Now computing the sum. "); break; case 'c': printf("You selected c. "); break; case 'd': printf("You selected d. "); break; case 'e': printf("You selected e. "); break; case 'f': printf("You selected f. "); break; case 'q': printf("Bye! Thanks for using our app! "); break; default : printf("Error. Select one from menu. "); break; } } }

Can you please help on how to do the area in bold in C programming, please explain why and how. Thank you.

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!