Computers and Technology

Read in an integer n from the user. You may assume that it is at least 2.
Call a separate function to determine if the number n is prime. You must use call and jumpr instructions to call and return from this separate function. The function should use a loop to determine if n is prime, and it should return the appropriate value: If n is not prime, the function should return the smallest value between 2 and n // 2 that divides into n evenly.
If n is prime, the function should return the number n itself. After the function call has returned, the program should print two values:
the return value of the function
one of two integers:
if n is prime, it should print a 1 (for True)
if n is not prime, it should print a 0 (for False)

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:30, messyquestions
Plz 40 points what are raster vectors? a bitmap image a vector file a type of printing press a small projector
Answers: 1
image
Computers and Technology, 22.06.2019 19:00, trintrin227
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
image
Computers and Technology, 23.06.2019 00:00, brooklyn4932
What engine component is shown in the above figure?
Answers: 1
image
Computers and Technology, 23.06.2019 08:00, leleee10
Which argument is not a valid filter? does not equal this quarter filter by cell color all of these are valid filter arguments.
Answers: 2
Do you know the correct answer?
Read in an integer n from the user. You may assume that it is at least 2.
Call a separate fun...

Questions in other subjects:

Konu
Mathematics, 26.08.2019 02:20
Konu
Mathematics, 26.08.2019 02:30
Konu
Medicine, 26.08.2019 02:30