Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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:
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 endStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started