1 //to check wheather given prime or not in for loop using c
Answers
Answered by
0
Answer:
Program to Check Prime Number In the program, a for loop is iterated from i = 2 to i < n/2 . If n is perfectly divisible by i , n is not a prime number. In this case, flag is set to 1, and the loop is terminated using the break statement. After the loop, if n is a prime number, flag will still be 0.
Explanation:
I hope it is helpful .
mark me as brainlist .
Similar questions