a C program is required to do the following: a) Sequentially accept input from the user for 15 integer values using a 1D array b) Reverse the order of elements in this array c) Multiply all the odd numbers in the array and store the result of the multiplication. d) Print out all the elements of the 1D array before and after the reverse operation of step b) above as comma-separated values, as well as the result of the multiplication operation. Required: The program should generate an accurate output in the C programming language. Provide: - An analysis of the problem, i.e., the data and variable requirements - A proper algorithm for planning the solution. - Good programming practice, i.e., proper structuring of the program and the use of comments where necessary.
1. a C program is required to do the following:
a) Sequentially accept input from the user for 15 integer values using a 1D array
b) Reverse the order of elements in this array
c) Multiply all the odd numbers in the array and store the result of the multiplication.
d) Print out all the elements of the 1D array before and after the reverse operation of step b) above as comma-separated values, as well as the result of the multiplication operation.
Required:
The program should generate an accurate output in the C
Provide:
- An analysis of the problem, i.e., the data and variable requirements
- A proper
- Good programming practice, i.e., proper structuring of the program and the use of comments where necessary.
Step by step
Solved in 2 steps with 2 images