Check whether the number is prime or not

 // check whether the number is prime or not

#include<stdio.h>

int main()

{

    int i,j=2,n;

    printf("enter the number which you want to take check wheter the number is prime or not\n");

    scanf("%d",&i);

    for(j=2;j<=n;n++);

    {

        if(n%i==0)

        {

            printf("%d is print",n);

            

        }

        else

            printf("the number is not prime");

        

    }

    

           

    

}

Comments

Popular posts from this blog

Use of function in mathematics

My resume using HTML and CSS