subject
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

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 11:00, maddiiie128
Why is it uncommon for users to perform searches directly in database tables? a.)users are discouraged from interacting directly with tables because they might confuse tables with spreadsheets. b.) users are discouraged from interacting directly with tables because this may result in unintended changes to source data. c.)users do not have the technical skills required to perform searches directly in database tables. d.)users do not have the permissions required to perform searches directly in database tables.
Answers: 1
image
Computers and Technology, 24.06.2019 13:30, tami5
Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. the program should output the average high, average low, and the highest and lowest temper- atures for the year. your program must consist of the following functions: a. function getdata: this function reads and stores data in the two- dimensional array. b. function averagehigh: this function calculates and returns the average high temperature for the year. c. function averagelow: this function calculates and returns the aver- age low temperature for the year. d. function indexhightemp: this function returns the index of the highest high temperature in the array. e. function indexlowtemp: this function retur
Answers: 3
image
Computers and Technology, 24.06.2019 16:00, deepunalli300p3ur3i
Your is an example of personal information that you should keep private.
Answers: 2
image
Computers and Technology, 25.06.2019 05:00, romana21
What should you do if a dialog box covers an area of the screen that you need to see?
Answers: 1
You know the right 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
History, 24.06.2019 05:40