check number n is prime or not
Answers
Answered by
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
English,
15 hours ago
Math,
15 hours ago
Math,
1 day ago
Environmental Sciences,
8 months ago
English,
8 months ago