Computer Science, asked by rashijhajsr, 1 day ago

check number n is prime or not​

Answers

Answered by bhoomikasunithasures
0

Answer:

Please mark me Brainlist

Explanation:

Using a for loop iterate from 2 to sqrt(n) Declare a count variable and initialize it to 0. If the number is divisible by any other number then increment the count and come out of the loop. If the count is not equal to zero then it is not a prime number.

Similar questions