A Program That Read Any Integer & Test Prime Or Not Prime.

#include<stdio.h>
#include<conio.h>

void main()
{
    int n,i,p;
    clrscr();
    printf("Enter any number, n = ");
    scanf("%d",&n);

    if(n<2)
       p=0;
    else
       p=1;

    for(i=2;i<n;i++)
       if(n%i==0)
          p=0;
    if(p==1)
       printf("%d is Prime number",n);
    else
       printf("%d is not Prime number",n);

    getch();
}

///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........