[Plain]
/* 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
* Completion date: January 1, April 24, 2013
* Version No.: V1.0
*/
 
# Include <stdio. h>
 
Int main ()
{
Int num;
Int;
Int B;
Int c;
Printf ("enter a three-digit number :");
Scanf ("% d", & num );
 
If (num <100 | num> 999)
{
Printf ("% d is not a three-digit number. The input is incorrect! \ N ", num );
}
Else
{
A = num % 10; // a bit
B = num/10% 10; // 10
C = num/100; // bits
 
If (a * a + B * B + c * c = num)
{
Printf ("% d is Armstrong. \ n", num );
}
Else
{
Printf ("% d is not Armstrong! \ N ", num );
}
}
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
* Completion date: January 1, April 24, 2013
* Version No.: V1.0
*/
 
# Include <stdio. h>
 
Int main ()
{
Int num;
Int;
Int B;
Int c;
 
Printf ("enter a three-digit number :");
Scanf ("% d", & num );
 
If (num <100 | num> 999)
{
Printf ("% d is not a three-digit number. The input is incorrect! \ N ", num );
}
Else
{
A = num % 10; // a bit
B = num/10% 10; // 10
C = num/100; // bits
 
If (a * a + B * B + c * c = num)
{
Printf ("% d is Armstrong. \ n", num );
}
Else
{
Printf ("% d is not Armstrong! \ N ", num );
}
}
Return 0;
}