Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Content X + @ https://blackboard.uob.edu.bh/ultra/courses/_21377_1/cl/outline Remaining Time: 54 minutes, 51 seconds. Question Completion Status: QUESTION 9 10 points Save Answer & Write a Java program

image text in transcribed

Content X + @ https://blackboard.uob.edu.bh/ultra/courses/_21377_1/cl/outline Remaining Time: 54 minutes, 51 seconds. Question Completion Status: QUESTION 9 10 points Save Answer & Write a Java program (One class with a main method) to do the following: 1. Ask the user to enter an integer (n) 2. Declare an array of size n with integer data type. 3. Ask the user to enter the values of the array. 4. Create another array with of size n with integer data type. 5. Make a copy of the first array to the second array but in reverse order (e.g., the last element in the first array should be store in the first element in the second array and so on). 6. Output values stored in the two arrays. 7. Find and output how many values in both arrays are equal based on the index number, i.e. count matching values of two arrays based on same index value AND the element value of the array. Sample Input/output Enter n:4 Enter n:5 Enter array values: Enter array values: 1234 12345 First Array :1234 First Array 1 2 3 4 5 Second Array:4 3 2 1 Second Array:5 4 3 2 1 # of Equal values = 0 # of Equal values = 1 For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). B I U Paragraph Arial 14px E III A Click Save and Submit to save and submit. Click Save All Answers to save all answers. Type here to search ENG 12:09 PM 3/17/2021

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

3.What are the Importance / Role of Bank in Business?

Answered: 1 week ago

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago