赞
踩
- #include<stdio.h>
- int main(){
-
- int b=0,s=0,g=0;
- int count=0;
- //百位
- for( b=1;b<=4;b++){
- //十位
- for(s=1;s<=4;s++){
- //个位
- for(g=1;g<=4;g++){
- if(g!=s && g!=b && s!=b){
- count++;
- printf("%d%d%d\n",b,s,g);
-
-
- }
-
-
- }
- }
- }
- printf("count=%d",count);
- return 0;
- }

运行结果:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。