1.程序分析:
2.程序源代码:
main()
{
long sum=4,s=4;
int j;
for(j=2;j<=8;j++)/*j is place of number*/
{ printf("\n%ld",sum);
if(j<=2)
s*=7;
else
s*=8;
sum+=s;}
printf("\nsum=%ld",sum);
}
cnt=0;
for(i=0;i<=7;i++)
for(j=0;j<=7;j+)
for(k=0;k<=7;k++)
for(l=0;l<=7;l++)
for(m=0;m<=7;m++)
for(n=0;n<=7;n++)///6
for(p=0;p<=7;p++){
sum=p+n*10+m*100+l*1000+k*10000+j*100000+i*1000000;
if(sum%2==1) {cnt++;printf("%d\n",sum);}
}
是否允许重复