Home > Back-end >  C with 1-9 figures formed in the proportion of syntactic sugar for 1:2:3 three digits all of the pos
C with 1-9 figures formed in the proportion of syntactic sugar for 1:2:3 three digits all of the pos

Time:11-26

 # include & lt; Iostream> 
using namespace std;
Int main () {
Int n, a, b, c, d, e, f, g, h, I;
For (n=123; n<334; N++) {
A=n/100;
B=n/10% 10;
C=n % 10;
D=2 * n/100;
E=2 * n/10% 10;
F=2 * n % 10;
G=3 * n/100;
H=3 * n/10% 10;
I=3 * n % 10;
If ((a& & B& & C& & D& & E& & F& & G& & H& & I)
& & a!=b& & a!=c& & a!=d& & a!=e& & a!=f& & a!=g& & a!=h& & a!=I
& & b!=c& & b!=d& & b!=e& & b!=f& & b!=g& & b!=h& & b!=I
& & c!=d& & c!=e& & c!=f& & c!=g& & c!=h& & c!=I
& & D!=e& & D!=f& & D!=g& & D!=h& & D!=I
& & e!=f& & e!=g& & e!=h& & e!=I
& & F!=g& & F!=h& & F!=I
& & g!=h& & g!=I
& & h!=I)
Cout}
return 0;
}

CodePudding user response:

 
for (int i=1; i <4. + + I)
{
Int outValue=https://bbs.csdn.net/topics/123 * I;

Printf (" % d \ r \ n ", outValue);
}
  • Related