Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLS HELP ME FOR THIS REURS?VE JAVA CODE SOLUTION!!! * PLS DON'T USE STACK ,OUEUE etc. data structure. please follow the restrictions. can use array!!

PLS HELP ME FOR THIS REURS?VE JAVA CODE SOLUTION!!!

* PLS DON'T USE STACK ,OUEUE etc. data structure.

please follow the restrictions.

can use array!!

*PLS SIMPLE JAVA CODE

*Using java programming language and recursion.

A series of numbers and arithmetic operations given in this paper you will try to achieve a given result by combining. However,

there are some restrictions for the assignment. They are also explained below.

Firstly, you will read input from the keyboard. In the first line your number will be counted and the result will be.

?n the second line, the arithmetic operations you can use will be given.

ex:numbers input

(to be taken from user target number=45 your arrays last element ex=2 5 1 4 10 3 45 )

(please enter numbers)

?nput:

2 5 1 4 10 3 45

arithmetic operations input (to be taken from user)

(please enter arithmatic operations)(you don't have to use all operations )

example input:

+ * /

***you must use all numbers and numbers can not be used more than once. We will assume that the results will have the following shape to narrow the result set slightly

output format=(xi ?(xj ?(xk ?(xi?.......))))

?=showing any of the arithmetic operations.

So one of the results you can find for the example above is:

Output:

4 + (5 + (3(2 + (10/1))))=45(target number is 45)

*There can be more than one result, in this case you only need one result. You do not have to use all of the arithmetic operations, but you can not use any other operations. The number sequence will only consist of integers. if you can not find the result exactly, you should find the closest result you can find.

*arithmetic operations and number array to be taken from user

java programming language to be used.

The code must be in the above format for all types of arrays and arithmetic operations input.

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_2

Step: 3

blur-text-image_3

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

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

Students also viewed these Databases questions

Question

What about leadership lessons from particularly good or bad bosses?

Answered: 1 week ago

Question

When would you use one approach, and when would you use another?

Answered: 1 week ago