#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
int a[36],b[36]={},i,j,max,s;
for(i=0;i<36;i++)
{
printf("input a[%d]=",i);
scanf("%d",&a[i]);
for(j=1;j<=a[i];j++)
{
if(a[i]%j==0)
b[i]+=1;
}
printf("约数=%d\n",b[i]);
}
max=b[0];
for(i=0;i<36;i++)
{
if(b[i]>max)
{
max=b[i];
s=i;
}
}
printf("公约数最大的是%d",a[s]);
return 0;
}