Question: Write a program that reads a number and prints YES if the number is prime, in other case it must print NO. (A prime number

Write a program that reads a number and prints YES if the number is prime, in other case it must print NO. (A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers.)

Sample Input.

7

Sample Output

YES

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!