Home > Back-end >  C language output all the daffodil number, why doesn't this code to lose out
C language output all the daffodil number, why doesn't this code to lose out

Time:06-07

Please point out what is going wrong,





#include

Void main ()
{
Int a, b, c, n;
For (n=1; N<1000; N++)
{
If (n==a * 100 * 10 + b + c)
{
If (n==a * a * b + a + b * b * c * c * c)
Printf (" n=% d ", n);
The else continue;

}
}
}

CodePudding user response:

If the braces are not le

CodePudding user response:

If change to this?
If (n==a * a * b + a + b * b * c * c * c& & N==a * 100 * 10 + b + c)
?

CodePudding user response:

You this program also too show, myself to a, b, c to infer that came out

CodePudding user response:

Understand the
Made a very low-level mistakes

CodePudding user response:

After the for request an ABC
100 b=a=n/(n - 100 - a)/10 c=n %

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related