C Saved Program: peaceful-home

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


#include<stdio.h>
#include <stdlib.h>

int main()
{
int a[100],min=1000,i,j,N,k,count=0;
scanf("%d",&N);
for(i=0;i<N;i++)
{
    scanf("%d",&a[i]);
}
k=0;
while(k<N)
{
 for(j=2;j<=a[k]/2;j++)
    {
        if(a[k]%j==0)
        count++;
    }
k++;
if(count<min)
{
    min=count;
}
}
printf("%d",min);

}
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs