Prime or Not Using for statement in C program
//for statement #include<stdio.h> #include<conio.h> int main() { int n,i,flag=0; printf("ENter a positive integer:"); scanf("%d",&n); for(i=2;i<n/2;i++) { if(n%i==0) { flag=1; break; } } if(flag==0) printf("%d is a prime number",n); else printf("%d …
Prime or Not Using for statement in C program Read More