#include<stdio.h>
#include<conio.h>
void main ( )
{
int num,I,f=0;
printf(“Enter the number you want to check:\n);
scanf(“%d”,&num);
for(i=2;i<num;i++)
{
if(num%i==0)
{
f=f+1;
}
}
if(f==0)
{
printf(“number %d is prime “,num);
}
else
printf(“number %d is composite”,num);
getch();
}

Output
PDfmaze
/
ApkNxt
Post a Comment
thank u so much
love 3