#include<stdio.h>
#include<conio.h>
void
main()
{
int
a[10],n,i,j,sum=0,prime[10],t=0;
clrscr();
printf("Enter
the value of n=");
scanf("%d",&n);
printf("Enter
the array=\n");
for(i=0;i<n;i++)
{
printf("Enter
number=%d",i);
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
{
sum=0;
for(j=2;j<a[i];j++)
{
if(a[i]%j==0)
{
sum=1;
break;
}
}
if(sum==0)
{
prime[t]=a[i];
t++;
}
}
printf("prime
number is=");
for(i=0;i<t;i++)
{
printf("%d",prime[i]);
printf("\n");
}
getch();
}
/*out put:-
Enter the value
of n=10
Enter the array=
Enter number=10
Enter number=13
Enter number=25
Enter number=27
Enter number=73
Enter number=44
Enter number=53
Enter number=55
Enter number=12
Enter number=20
prime number
is=13
73
53
*/