![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)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 15:30, 1232444553
Which of the following examples has four beats in each measure?
Answers: 2
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 10:00, zlittleton2008
Which feature of a blog to restore and retrieve older post
Answers: 3
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 12:00, violetagamez2
What is a sketch or blueprint of a web page that shows the structure (but not the detailed design) of basic page elements such as the logo, navigation, content, and footer?
Answers: 3
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 in other subjects:
![Konu](/tpl/images/cats/fizika.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 25.10.2021 20:00
![Konu](/tpl/images/cats/biologiya.png)
Biology, 25.10.2021 20:00
![Konu](/tpl/images/cats/mat.png)
Mathematics, 25.10.2021 20:00
![Konu](/tpl/images/cats/fizika.png)
Physics, 25.10.2021 20:00
![Konu](/tpl/images/cats/fizika.png)
![Konu](/tpl/images/cats/User.png)
![Konu](/tpl/images/cats/ekonomika.png)
![Konu](/tpl/images/cats/User.png)
![Konu](/tpl/images/cats/informatica.png)
Computers and Technology, 25.10.2021 20:00