不重复的三位数
用1 2 3 4这四个数组成不重复的三位数,每个数位的数也不同,问都有谁
流程图:
伪代码:
源代码:
#include<iostream>
using namespace std;
int main(){
int a,b,c,d;
for(a=1;a<=4;a++){
for(b=1;b<=4;b++){
for(c=1;c<=4;c++){
if(a!=b&&a!=c&&b!=c){
cout<<a<<b<<c<<"\n"<<endl;
}
}
}
}
return 0;
}
标签:int,30,c++,三位数,&&,打卡 From: https://www.cnblogs.com/HD-Kudu-2219/p/17406038.html