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
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
question
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
question
Computers and Technology, 24.06.2019 11:00
Need fast im timed in a paragraph of 125 words, explain at least three ways that engineers explore possible solutions in their projects.
Answers: 2
question
Computers and Technology, 25.06.2019 10:30
Which of the following if statements uses a boolean condition to test: "if the item is on sale, you can buy it"? a: if( onsale < = "yes" ): b: if( onsale > = "yes" ): c: if( onsale == "yes" ): d: if( onsale ! = "yes" ):
Answers: 2
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, 27.03.2020 10:23
question
English, 27.03.2020 10:23
question
Mathematics, 27.03.2020 10:24
question
Geography, 27.03.2020 10:25
question
Biology, 27.03.2020 10:25
question
Mathematics, 27.03.2020 10:26
Questions on the website: 13722363