Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

The below program has been tested on ubuntu 1604 system and compiled using g compiler This code will ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Structures and Algorithm Analysis in Java

Authors: Mark A. Weiss

3rd edition

132576279, 978-0132576277

More Books

Students also viewed these Programming questions