#include<conio.h>
#include<stdio.h>
void main()
{
int a[10],i,j,n;
printf(“Enter the
size of array\t”);
scanf(“%d”,&n);
printf(“Enter the
elements of the array\t”);
for(i=0;i<h;++i)
{
for(j=2;j<=a[i]/2;++j)
{
if(a[i]%j==0)
{
printf(“%d
is not prime \n”,a[i]);
break;
}
}
}
getch();
}
OUTPUT :
Enter the size of array 10
Enter the element of array
1
2
3
4
5
6
7
8
9
1
4
6
8
9
is not prime
0 comments:
Post a Comment