-
-
Save Divyanbhard29/d11db102f026508971609f2962e6cb10 to your computer and use it in GitHub Desktop.
PerfectMellowDigits created by Divyanshu29 - https://repl.it/@Divyanshu29/PerfectMellowDigits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
void checkprimenumber(); | |
int main() | |
{ | |
checkprimenumber(); | |
return 0; | |
} | |
void checkprimenumber() | |
{ | |
int i,n,flag; | |
printf("Enter a value of n"); | |
scanf("%d",&n); | |
for(i=2;i<=n/2;++i) | |
{ | |
if(n%i == 0) | |
{ | |
flag = 1; | |
} | |
} | |
if(flag == 1) | |
{ | |
printf("Number is not prime number"); | |
} | |
else | |
{ | |
printf("Number is prime number"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
//This is my first program that I want to share between different types of developer from all over the world and from different experiences. I hope everyone would like my code//