to check weather it is a prime number or not #include <stdio.h> int main() { int i,no,c; printf("Enter the positive number "); scanf("%d",&no); for(i=1;i<=no;i++){ if(no%i==0){ c++; } } if(c==2){ printf("Its a prime number"); } else{ printf("Its not a prime number"); } return 0; }
-
Notifications
You must be signed in to change notification settings - Fork 2
Kalpanarathod15/2205142_prime_number
About
to check weather it is a prime number or not
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published