Question: JAVA - Integer arrays values 1 and values 2 are read from input, each containing three elements. If an element in values 1 is less

JAVA - Integer arrays values1 and values2 are read from input, each containing three elements. If an element in values1 is less than or equal to the corresponding element in values2, then replace the element in values1 with -1. Otherwise, subtract 3 from the element in values1.
Ex: If the input is:
433712
213414
then the output is:
4034-1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!