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, 23.06.2019 04:00
In a word processing program, such as microsoft word, which feature to you choose the desired picture enhancement?
Answers: 2
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Plz ( which is an example of a good url?
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
What are the most commonly found items in the trash according to the municipal solid waste report?
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
Mathematics, 04.03.2021 04:30
question
Mathematics, 04.03.2021 04:30
question
Mathematics, 04.03.2021 04:30
Questions on the website: 13722367