0% found this document useful (0 votes)
59 views6 pages

Write A Program To Check Armstrong Number

The document presents a C programming solution for checking Armstrong numbers, which are defined as numbers equal to the sum of their digits raised to the power of the number of digits. It outlines the algorithm steps, including inputting a number, counting digits, extracting digits, calculating the sum, and comparing it to the original number. The conclusion confirms that the program successfully identifies Armstrong numbers through these calculations.

Uploaded by

arnabruet2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views6 pages

Write A Program To Check Armstrong Number

The document presents a C programming solution for checking Armstrong numbers, which are defined as numbers equal to the sum of their digits raised to the power of the number of digits. It outlines the algorithm steps, including inputting a number, counting digits, extracting digits, calculating the sum, and comparing it to the original number. The conclusion confirms that the program successfully identifies Armstrong numbers through these calculations.

Uploaded by

arnabruet2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Title : “Checking

Armstrong Number
Using C
Programming”

Presenter :TAWJID IPSAN NOUF (1031)
AL FAISAL EMON(1030)
Course name : BCP

Submitted to : Tuton Chandra Mallick


Problem Statement


 What is an Armstrong number? An
Armstrong number is a number that is equal
to the sum of its digits, each raised to the
power of the number of digits in the number.

 Example: 153 = 13+53+33=153


Algorithm and Steps

 Step 1 : Input a number from the user.
 Step 2 :Count the number of digits in the number.
 Step 3 :Extract each digit using modulus and division.
 Step 4: Calculate the sum of each digit raised to the power of
the total digits.
 Step 5 : Compare the sum with the original number.
 Step 6 : If the sum matches, it’s an Armstrong number.

 Example:
 Input: 153
 Digits: 1, 5, 3
 Sum: 13+53+33=153
 Output: "Armstrong Number"
C Code (Main+Function)

Fig 1
Result

Fig : 2 (Output) Fig : 3 (Output)


Conclusion

 The program correctly determines Armstrong
numbers by breaking the input into digits,
performing the required calculations, and
comparing the results.

You might also like