Home > Back-end >  Help leaders to help have a look at how to draw flow chart. Save the children!
Help leaders to help have a look at how to draw flow chart. Save the children!

Time:09-16

C language assignment: to find all the eligible "double-digit * three digits" double-digit ﹦ double-digit, each digit placeholder Numbers 1 to 9, do not contain 0, cannot repeat, also asked to write design report, I want to use 9 is a nested for loop, lookup, violence (or bosses have any other ideas?
Now stuck in the flow chart of this pass, bosses can instruct me how to draw?

# include
Int main ()
{
Int a, b, c, d, e, f, g, h, I;
For (a=1; a<10; +)
{
For (b=1; B<10; B++)
{
If (b==a)
continue;
For (c=1; C<10; C + +)
{
If (c==b | | c==a)
continue;
For (d=1; D<10; D++)
{
If (d==a | | d==b | | d==c)
continue;
For (e=1; E<9. E++)
{
If (e==| | e==b | | e==c | | e==d)
continue;
For (f=1; F<10; F++)
{
If (f==a | | f==b | | f==c | | f==d | | f==e)
continue;
For (g=1; G<10; G + +)
{
If (g==a | | g==b | | g==c | | g==d | |=g=e | | g==f)
continue;
For (h=1; H<10; H++)
{
If (h==a | | h==b | | h==c | | h==d | | h==e | | h==f | | h==g)
continue;
for(i=1; i<10; I++)
{
If (I==a | | I==b | | I==c | | I==d | | I==e | | I==f | | I==g | | I==h)
continue;
If ((10 * (a + b) * (10 * c + d))==((10 * e + f) * (100 * g + 10 * h + I)))
{
Printf (" % d % d % d=% d * * % d % d % d % d % d \ n ", a, b, c, d, e, f, g, h, I);
}
}
}
}
}
}
}
}
}
}
return 0;
}

CodePudding user response:

By myself... Bosses have a look at the children

CodePudding user response:

To see this post at https://bbs.csdn.net/topics/396858956
  • Related