subject

A prime number is an integer that is divisible only by 1 and by itself. Write a program that: 1. Takes a number as an input.

2. Prints back to the console all the primes that are larger than 1 but not larger than the number that has been entered.

You need to have a procedure called isPrime. You may have more procedures if you like.

1. This procedure receives a number through one of the registers.

2. Checks if this number is prime.

3. Returns back through one of the registers to the main program 1, if the number is prime, 0 otherwise.

sample run:

Please enter a number: 44

Primes found until the given number:

2 3 5 7 11 13 17 19 23 29 31 37 41 43 Press any key to continue . . .

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Consider how gaming consoles initially relied on joysticks and joypads and then made the switch to modern gaming controls, which include analog sticks, buttons and switches, touch controls, accelerometers, motion controls, etc. name at least two kinds of gaming experiences that are possible with these new control devices but were not possible on original joysticks. explain how new technologies made this newer game style possible.
Answers: 1
question
Computers and Technology, 22.06.2019 12:40
How do i get the most points, without any effort?
Answers: 2
question
Computers and Technology, 22.06.2019 15:30
In a compound condition, both conditions on either side of the logical operator and must be true for the overall condition to be true. a: true b: false
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
You know the right answer?
A prime number is an integer that is divisible only by 1 and by itself. Write a program that: 1. Ta...
Questions
question
Mathematics, 04.06.2020 00:59
question
Mathematics, 04.06.2020 00:59
question
Mathematics, 04.06.2020 00:59
question
English, 04.06.2020 00:59
question
English, 04.06.2020 00:59
question
Mathematics, 04.06.2020 00:59
question
Mathematics, 04.06.2020 00:59
question
Mathematics, 04.06.2020 00:59
question
Mathematics, 04.06.2020 00:59
Questions on the website: 13722363