Question: a). Write a program to declare and initialize an array of size 5 and place odd numbers 3, 5, 7,9 and 11 in it. Declare
a). Write a program to declare and initialize an array of size 5 and place odd numbers 3, 5, 7,9 and 11 in it. Declare and initialize another array of size 5 and place even numbers 4, 6, 8,10 and 12 in it. Write a fore loop to add each element and place it in a third array of the same dimensions. Display each array.
b). Write a program to display an array of size 5 in reverse order. Test your program with the odd array you defined in previous program.
Step by Step Solution
3.51 Rating (151 Votes )
There are 3 Steps involved in it
To solve the question Ill guide you through the process of creating two different programs one for part a and another for part b Part a Well declare a... View full answer
Get step-by-step solutions from verified subject matter experts
