write a prgrm to check a no is prime or not
Answers
Answered by
2
hope it helps u. . . . . . .
Attachments:
![](https://hi-static.z-dn.net/files/d8b/891860e849d30b4ef6e45b2ca2f1f2c7.jpg)
Answered by
2
Example: Program to Check Prime Number
Enter a positive integer: 29 29 is a prime number. If the for loop terminates when the test expression of loop i <= n/2 is false, the entered number is a prime number. The value of flag is equal to 0 in this case.
Follow me ✌✌✌❤❤❤
Attachments:
![](https://hi-static.z-dn.net/files/d14/11b1b4acac71847845bd7893adbc8e0a.jpg)
Similar questions