Program on switch statements for manipulating the array


Question 1) Write the program based on switch statements for manipulating the following array: z = {{8,15,22,28,36,40},{43,45,48,59,66,70}}

a)  This program must get input from user to select the case. Create two cases.

b) If user selects first case, then program must do the following:

i) Program asks user to enter any number, multiply every element of the array z by that number, and print the results.

ii) If user selects second case, then program must print all the elements in array z which are either divisible by 2 or 5.{ Hint: you can use logical OR operator for a test condition. }

c) Include default case in your program that prints a message “array z is not changed”.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Program on switch statements for manipulating the array
Reference No:- TGS04569

Expected delivery within 24 Hours