Question
in java Write a program that reads a list of integers, and outputs whether the list contains all multiples of 10, no multiples of 10,
in java
Write a program that reads a list of integers, and outputs whether the list contains all multiples of 10, no multiples of 10, or mixed values. Define a method named isArrayMult10 that takes an array as a parameter, representing the list, and an integer as a parameter, representing the size of the list. isArrayMult10() returns a boolean that represents whether the list contains all multiples of ten. Define a method named isArrayNoMult10 that takes an array as a parameter, representing the list, and an integer as a parameter, representing the size of the list. isArrayNoMult10() returns a boolean that represents whether the list contains no multiples of ten.
Then, write a main program that takes an integer, representing the size of the list, followed by the list values. The first integer is not in the list. Assume that the list will always contain less than 20 integers.
The program must define and call the following two methods. isArrayMult10() returns true if all integers in the array are multiples of ten and false otherwise. isArrayNoMult10() returns true if no integers in the array are multiples of ten and false otherwise. public static boolean isArrayMult10(int[] arrayValues, int arraySize) public static boolean isArrayNoMult10(int[] arrayValues, int arraySize)
import java.util.Scanner;
public class LabProgram { /* Define your method here */
public static void main(String[] args) { /* Type your code here. */ } }
Then, write a main program that takes an integer, representing the size of the list, followed by the list values. The first integer is not in the list. Assume that the list will always contain less than 20 integers. Ex: If the input is: 520406080100 the output is: Ex: If the input is: 51132537495 the output is: Ex: If the input is: 51025304055 the output is: mixed values The program must define and call the following two methods. isArrayMult100 returns true if all integers in the array are multiples of ten and false otherwise. isArrayNoMult100 returns true if no integers in the array are multiples of ten and false otherwise. public static boolean isArraymult10(int[] arrayvalues, int arraysize) public static boolean isArrayNoMult10(int[] arrayValues, int arraysize)Step by Step Solution
There are 3 Steps involved in it
Step: 1
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