World Languages, asked by bhushandeore5692, 2 months ago

1 //to check wheather given prime or not in for loop using c

Answers

Answered by falguni93
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