Question: JAVA turn this psuedo code into java code. USING NO LOOPS! ALL LOOPS MUST BE TURNED INTO RECURSIVE CALLS. English: 1. Prompt for and read

JAVA

turn this psuedo code into java code.

USING NO LOOPS! ALL LOOPS MUST BE TURNED INTO RECURSIVE CALLS.

English:

1. Prompt for and read a number between 1 and 5. Repeat this step until the input is 1..5. 2. Repeat the following multiple times according to the number read in step 1.

a. Read in a list of integers ending with a 0. The 0 marks the end of the input and is not considered part of the list b. Print the largest and smallest integers in the list. c. If only a zero appears in the list, print an error message

Psuedo code:

JAVA turn this psuedo code into java code. USING NO LOOPS! ALL

begin repeat prompt user to enter a number from 1 to 5 read number until number is from 1 to 5 repeat number times decrement number read input if input 0 print error message else set min to input set max to input read input repeat while input is not 0 if input min then set min to input else if input max then set max to input end if end if read input end repeat print max print min end if end repeat end

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!