Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For each of the following exercises, write the Java code statements to perform the action(s) requested. Submit your code statements and a capture of your
For each of the following exercises, write the Java code statements to perform the action(s) requested. Submit your code statements and a capture of your outputs for each exercise.
1. Take 5 integers from a user and store them in an array and then print them on the display screen in reverse order.
2. Modify the method created in #1 to take in 5 integers from a user and store them in an array. Then ask the user to repeat one of the ten numbers.
Respond to the user that yes, the number is in the list or no, the number is not in the list.
3. Accept 15 integers from a user and print the following: (The pattern of the numbers entered is up to you: it can be a compressed string on 1-digit values [with repetitions] - 12345678901235; or space delimited - 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; or any other format you wish to use).
b. number of negative numbers
c. number of odd numbers
d. number of even numbers
e. the largest number
f. the smallest number
g. number of 0s.
Mary CS101 CS115 CS270
Isabella CS101 CS110 CS270
Orson CS220 CS255 CS270
1. Take 5 integers from a user and store them in an array and then print them on the display screen in reverse order.
2. Modify the method created in #1 to take in 5 integers from a user and store them in an array. Then ask the user to repeat one of the ten numbers.
Respond to the user that yes, the number is in the list or no, the number is not in the list.
3. Accept 15 integers from a user and print the following: (The pattern of the numbers entered is up to you: it can be a compressed string on 1-digit values [with repetitions] - 12345678901235; or space delimited - 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; or any other format you wish to use).
b. number of negative numbers
c. number of odd numbers
d. number of even numbers
e. the largest number
f. the smallest number
g. number of 0s.
Mary CS101 CS115 CS270
Isabella CS101 CS110 CS270
Orson CS220 CS255 CS270
Step by Step Solution
There are 3 Steps involved in it
Step: 1
ACTIVITY 1 import javautilScanner public class Exercise1 public static void mainString args int numbers new int5 Scanner scanner new ScannerSystemin SystemoutprintlnEnter 5 integers for int i 0 i 5 i ...
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