admin 管理员组

文章数量: 887362


2024年2月28日发(作者:excel中sqrt函数的使用方法)

int main(void){int dmax,dmin,diff,i,r,count;long t;char nums[4],max[4],min[4];srand((unsigned)time(&t));for(count = 0;count <10000;count++){get_random(nums);printf("%c%c%c%cn",nums[0],nums[1],nums[2],nums[3]);for(i=0;i<7;i++){m(nums,4);dmax = nums[0]*1000 + nums[1]*100+nums[2]*10+nums[3];n(nums,4);dmin = nums[0]*1000 + nums[1]*100+nums[2]*10+nums[3];diff = dmax - dmin;diff = j2(diff);if(diff == 6174){printf("find 6174 %dn",count);break;}if(i == 6 && diff != 6174)goto error;nums[0] = diff/1000;nums[1] = diff%1000/100;nums[2] = diff%1000%100/10;nums[3] = diff%10;}}getchar();return (0);error:printf("Can't find 6174 %dn",count);getchar();return (0);}

for(int i=0;i<3;i++){for(int j=i+1;j<4;j++){if(byte[i]int t=byte[i];byte[i] = byte[j];byte[j] = t;}}}// printf(" sort byte is %d %d %d %dn",byte[0],byte[1],byte[2],byte[3]);// printf("<<<<<<<<<<<<<<<byte[j]){int t=byte[i];byte[i] = byte[j];byte[j] = t;}}}// printf(" sort byte is %d %d %d %dn",byte[0],byte[1],byte[2],byte[3]);// printf(">>>>>>>>>>>>>>>>>n");min = byte[0]*1000+byte[1]*100+byte[2]*10+byte[3];return min;}int main(){int a = 0;printf("input the num :n");int max;

1234the num:1234deal num:1234the max:4321the min:1234the num:3087deal num:3087the max:8730the min:378the num:8352deal num:8352the max:8532the min:2358the num:6174deal num:6174bingoweiqifa@bsp-ubuntu1804:~/c$附图1


本文标签: 方法 函数 使用