![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 25.02.2021 19:00 lolyan555
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](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
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](/tpl/images/cats/informatica.png)
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](/tpl/images/cats/informatica.png)
![question](/tpl/images/cats/informatica.png)
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](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 04:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/en.png)
English, 04.03.2021 04:30
![question](/tpl/images/cats/en.png)
English, 04.03.2021 04:30
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 04:30
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 04:30
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 04:30
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 04:30
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 04:30
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 04:30