write a program to accept a number and check whether it is prime or not.
A number is said to be prime if it is di visible by 1 and itself and not by any other number
example 3,5,7,11,13.....
Answers
Answered by
5
Answer:
Your answer is in the attachment.
The 1st photo is the program.
The 2nd photo is the output for a prime number.
The 3rd photo is also a output for a prime number.
The 4th photo is the output for a non-prime number.
The 5th photo is also the output for a non-prime number.
Hope it helps....
Mark as brainliest.
Attachments:
Similar questions