C# 怎样用a-z生成8位字符串的所有组合
答案:3 悬赏:0 手机版
解决时间 2021-03-27 05:30
- 提问者网友:火车头
- 2021-03-26 23:30
C# 怎样用a-z生成8位字符串的所有组合
最佳答案
- 五星知识达人网友:酒者煙囻
- 2021-03-27 00:42
char ba[]={"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
string s;
for(int a=0;a for(int b=0;b for(int c=0;c for(int d=0;d for(int e=0;e for(int f=0;f for(int g=0;g for(int h=0;h s=s+ba[a]+ba[b]+ba[c]+ba[d]+ba[e]+ba[f]+ba[g]+ba[h]+"\n";
}
}
}
}
}
}
}
}
代码应该就是这样的吧!C#不常用.
string s;
for(int a=0;a
}
}
}
}
}
}
}
}
代码应该就是这样的吧!C#不常用.
全部回答
- 1楼网友:零点过十分
- 2021-03-27 01:21
8层for循环,不过运行时很卡,要计算26的8次方次
- 2楼网友:低血压的长颈鹿
- 2021-03-27 00:58
这个数量相当庞大吧 你Java跑几天就跑不完
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯