Skip to content

Instantly share code, notes, and snippets.

@Divyanbhard29
Forked from anonymous/PerfectMellowDigits.c
Created February 25, 2018 20:01
Show Gist options
  • Save Divyanbhard29/d11db102f026508971609f2962e6cb10 to your computer and use it in GitHub Desktop.
Save Divyanbhard29/d11db102f026508971609f2962e6cb10 to your computer and use it in GitHub Desktop.
PerfectMellowDigits created by Divyanshu29 - https://repl.it/@Divyanshu29/PerfectMellowDigits
#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");
}
}
@Divyanbhard29
Copy link
Author

//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//

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment