Computers and Technology
Computers and Technology, 14.09.2019 06:30, CM0

Write a program in java that consists of a "isprime" method that takes an integer as a parameter and returns a boolean value that indicates whether the parameter is a prime number(i. e. returns true if it is a prime number, false if it is not prime). the method signature should like this: public static boolean isprime(int num)
in your "main" method, prompt the user to input a list of numbers. assume that the input ends with number 0. the main method will make a call to "isprime" for each number to determine whether that number is a prime number. the "main" method will display the results to the user.
here's a sample run of the program:
sample 1:
enter numbers: 173 109 181 138 190 100 193 140 0

answer
Answers: 1

Similar questions

Do you know the correct answer?
Write a program in java that consists of a "isprime" method that takes an integer as a parameter and...

Questions in other subjects:

Konu
Mathematics, 05.11.2019 20:31