/* Prime number*/
#include<stdio.h>
int main(){
    int n,dv,i;
    printf("Enter a number");
    scanf("%d",&n);
    for(i=1;i<=n;i++){
        if(n%i==0){
            dv=dv+1;
        }
    }
    if(dv>2){
        printf("\n%d is a not a prime number",n);
    }else
    printf("\n%d is a prime number",n);
    
    
return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: