subject

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)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
What can tanya do now to start preparing for the college and scholarship application process? think about her grades, activities in which she can get involved, possible part-time jobs at which she can work, and standardized tests she can take. (10 points) apex
Answers: 2
question
Computers and Technology, 23.06.2019 01:10
Are special combinations of keys that tell a computer to perform a command. keypads multi-keys combinations shortcuts
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
Many everyday occurrences can be represented as a binary bit. for example, a door is open or closed, the stove is on or off, and the fog is asleep or awake. could relationships be represented as a binary value? give example.
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
You know the right answer?
Read in an integer n from the user. You may assume that it is at least 2.
Call a separate fun...
Questions
question
Mathematics, 26.06.2019 09:00
question
Chemistry, 26.06.2019 09:00
Questions on the website: 13722363