//Prime no.
#include<stdio.h> main() { int n,i,k=0; printf("enter value"); scanf("%d",&n); for(i=2;i<n;i++) { if(n%i==0) k=1; } { if(k==0) printf("it is a prime no"); else printf("it is not a prime no"); } }
No comments:
Post a Comment