|Question # 40027||Programming||4 months ago|
1. Write a program that uses an array declaration statement to initializethe following numbers in an array named slopes: 17.24, 25.63, 5.94, 33.92, 3.71, 32.84,35.93, 18.24, and 6.92. Your program should locate and display the maximum and minimumvalues in the array.
2.Write a C program that reads a list of double-precision grades from the keyboard into an array named grade with 50 elements. After all grades have been input, your program should find and display the sum and average of the grades.
3. Define an array with a maximum of 20 integer values, and fill the arraywith numbers input from the keyboard or assigned by the program. Then write afunction named split() that reads the array and places all zeros or positive numbersin an array named positive and all negative numbers in an array named negative.
Finally, have your program call a function that displays the values in both the positive and negative arrays.
4. Write a program that asks the users to enter a value for array size “n” and fill up the array with n integers. Then reverse the array and print it on the screen. You are required to do the following in your program:
Create an array of 10 elements.
“n”, the array size, should be greater than zero and less than 10
Each element of the array should be positive and divisible by 3
Array should be reversed within itself. i.e. you must not create another array to place the elements in reverse order