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 19:00
Stacy works as blank. the most important soft skill she needs for this role is blank.
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
On early television stations, what typically filled the screen from around 11pm until 6am? test dummies test patterns tests testing colors
Answers: 1
question
Computers and Technology, 24.06.2019 11:30
Convert 11001110(acdd notation) into decimal
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
Which describes careers that have similar education requirements but different qualifications? product safety engineers and materials engineers industrial safety engineers and industrial health engineers quality control systems managers and inspectors industrial safety and health engineers and hand packers
Answers: 3
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, 23.10.2020 01:01
question
History, 23.10.2020 01:01
question
Mathematics, 23.10.2020 01:01
question
Mathematics, 23.10.2020 01:01
Questions on the website: 13722360