Print? /* Start the comments in the program header (to avoid any problems encountered during the submission of blog posts, the slash used to indicate that the comments have been deleted)
* Copyright and version Declaration of the program
* All rights reserved.
* File name: txt. c
* Author: liuyongshui
* Question: In the following addition formula, different symbols represent different numbers, and the same symbols represent the same numbers.
* C
*
* C
*
* + C is required
*
*________________
*
* 2 0 0 8
* Problem source:
* Completion date: January 1, April 10, 2013
* Version No.: V1.0
*/
# Include <stdio. h>
Int main ()
{
Int a; // indicates "all"
Int B; // indicates "yes"
Int c; // represents "Learning"
Int d; // represents "C"
Int l;
Int m;
Int n;
Int flag = 0;
//! = 0, B! = 0, c! = 0,! = B! = C and a <3 & a> 0
For (a = 1; a <3; a ++)
{
For (B = 1; B <10; B ++)
{
If (! = B)
{
For (c = 1; c <10; c ++)
{
If (c! = A & c! = B)
{
For (d = 0; d <10; d ++)
{
If (d! = C & d! = A & d! = B)
{
N = c * 10 + d;
M = B * 100 + c * 10 + d;
L = a * 1000 + B * 100 + c * 10 + d;
If (n + m + l = 2008)
{
Flag = 1; // if there is a valid number, mark it as 1;
Printf ("All = % d to = % d = % d C = % d \ n", a, B, c, d );
Printf ("all want to learn C = d % \ n", l );
Printf ("learn C = % d \ n", m );
Printf (" C = % d \ n", n );
}
}
}
}
}
}
}
}
If (flag = 0)
{
Printf ("no answer to this question! \ N ");
}
Return 0;
}
/* Start the comments in the program header (to avoid any problems encountered during the submission of blog posts, the slash used to indicate that the comments have been deleted)
* Copyright and version Declaration of the program
* All rights reserved.
* File name: txt. c
* Author: liuyongshui
* Question: In the following addition formula, different symbols represent different numbers, and the same symbols represent the same numbers.
* C
*
* C
*
* + C is required
*
*________________
*
* 2 0 0 8
* Problem source
* Completion date: January 1, April 10, 2013
* Version No.: V1.0
*/
# Include <stdio. h>
Int main ()
{
Int a; // indicates "all"
Int B; // indicates "yes"
Int c; // represents "Learning"
Int d; // represents "C"
Int l;
Int m;
Int n;
Int flag = 0;
//! = 0, B! = 0, c! = 0,! = B! = C and a <3 & a> 0
For (a = 1; a <3; a ++)
{
For (B = 1; B <10; B ++)
{
If (! = B)
{
For (c = 1; c <10; c ++)
{
If (c! = A & c! = B)
{
For (d = 0; d <10; d ++)
{
If (d! = C & d! = A & d! = B)
{
N = c * 10 + d;
M = B * 100 + c * 10 + d;
L = a * 1000 + B * 100 + c * 10 + d;
If (n + m + l = 2008)
{
Flag = 1; // if there is a valid number, mark it as 1;
Printf ("All = % d to = % d = % d C = % d \ n", a, B, c, d );
Printf ("all want to learn C = d % \ n", l );
Printf ("learn C = % d \ n", m );
Printf (" C = % d \ n", n );
}
}
}
}
}
}
}
}
If (flag = 0)
{
Printf ("no answer to this question! \ N ");
}
Return 0;
}