Question: Write a program to prompt the user to enter a positive number. It should then indicate whether it is a prime number or not. A

Write a program to prompt the user to enter a positive number. It should then indicate whether it is a prime number or not. A prime number is a whole number greater than 1 whose only factors are 1 and itself. A factor is a whole numbers that can be divided evenly into another number. The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. Using Visual Studio (LOOPS)

How do I check for that? If a number is divisible by any number smaller than it, then it is NOT prime.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!