subject

LAB: Even/odd values in an array Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers in the list. The first integer is not in the list. Assume that the list will always contain less than 20 integers.
Ex: If the input is:
5 2 4 6 8 10
the output is:
all even Ex:
If the input is:
5 1 -3 5 -7 9
the output is:
all odd
Ex: If the input is:
5 1 2 3 4 5
the output is:
not even or odd
Your program must define and call the following two methods. isArrayEven() returns true if all integers in the array are even and false otherwise. isArrayOdd() returns true if all integers in the array are odd and false otherwise.
public static boolean isArrayEven(int[] arrayValues, int arraySize)
public static boolean isArrayOdd(int[] arrayValues, int arraySize)
LabProgram. java
Load default template
1 import java until Scanner
2
3 public class ropa
4
5 /* Define your method here */
6
7 public static void main(Strist args) {
8 /* Type your code here */
9 }
10
11
11

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 02:00
Read the following scenario, and then answer the question below. you want to send an e-mail to your boss requesting a meeting to discuss a raise. what is the best example of an e-mail to an employer about this meeting? “hey jason. can we chat about getting me more money soon? let me know. peace, meg.” “hello jason. pardon me for sending yet another e-mail today about my need to talk to you about my position and a possible pay increase. i am dying to know when you can talk. sincerely, meg.” “hello jason. i have been with the company for one year and have taken on more responsibilities than outlined in my job description. i would appreciate an opportunity to speak with you about my position. let me know when we can schedule a meeting. you, meg.” “greetings jason! i hope this e-mail finds you well and happy today. i really, really want to talk to you about something important. i am not sure if you have time. i hope you do. get back in touch with me and let me know when we might talk. ever so much for taking the time to read this. sincerely, meg.”
Answers: 3
question
Computers and Technology, 24.06.2019 12:00
How can we take picture in this app
Answers: 1
question
Computers and Technology, 24.06.2019 13:20
In the insert table dialog box, you select the checkbox to create the first row as the header of the table.
Answers: 3
question
Computers and Technology, 24.06.2019 13:30
To move an excel worksheet tab, simply right-click on it drag and drop it double-click on it delete it
Answers: 1
You know the right answer?
LAB: Even/odd values in an array Write a program that reads a list of integers, and outputs whether...
Questions
question
Spanish, 26.06.2020 16:01