0

I'm planning to design a program such that any number entered will be divided by all the numbers less than it and if any of the division gives 0 as the reminder,it is not a prime.Here is my attempt so far and iam not able to proceed after that..

```
#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{long int n,i,k;
clrscr();
printf("Please enter any number.\n");
scanf("%ld" , &n);
for (i=2;i<=n-1;i=i+1)
{ k=n%i;}
if (k==0) printf("It is not a prime.\n");
else printf("It is a prime.\n");
getch();
}
```