#includevoid main(){ int num,k1,k2,k3,k4; for(num=1000;num<=9999;num++) { k1=num/1000; k2=num%1000/100; k3=num%100/10; k4=num%10;if(k1*k3!=0 && 10*k1+k3==5*(10*k2+k4)) printf("%d\n",num); }}