Answer C First 11 Prime Integers 2 3 5 7 11 13 17 19 23 29 31 Positive Integer 1 1000 Incl Q37269570

ANSWER IN C

The first 11 prime integers are 2, 3, 5, 7, 11, 13, 17, 19, 23,29, and 31.
A positive integer between 1 and 1000 (inclusive), other than thefirst 11 prime integers, is prime if it is not divisible by 2, 3,5, 7, 11, 13, 17, 19, 23, 29, and 31.

Write a program that prompts the user to enter a positiveinteger between 1 and 1000 (inclusive) and that outputs whether thenumber is prime.
If the number is not prime, then output all the numbers, from thelist of the first 11 prime integers, which divide the number.
Example Output:

Enter an integer between 1

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.