From 9ab5476a0c964a7beb7933d49da92483ad6850b6 Mon Sep 17 00:00:00 2001 From: shivhek25 Date: Sat, 8 Apr 2017 19:11:16 +0530 Subject: [PATCH] Delete Armstrong Number.txt --- Dynamic Programming/Armstrong Number.txt | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 Dynamic Programming/Armstrong Number.txt diff --git a/Dynamic Programming/Armstrong Number.txt b/Dynamic Programming/Armstrong Number.txt deleted file mode 100644 index 811af3cb6..000000000 --- a/Dynamic Programming/Armstrong Number.txt +++ /dev/null @@ -1,17 +0,0 @@ -Armstrong number - -An armstrong number is a number whose sum of cube of digits is equal to the original number. - -Example: 153 - -Here, - Sum of cube of digits= cube(1)+cube(5)+cube(3) - = 1+125+27 - = 153 - This is equal to the entered number. Hence, 153 is an armstrong number. - -Code: - -> In our code, we have extracted each digit of the number, found its cube and stored the sum of all such cubes in a variable. This sum has been compared in the end with the original number. - -> We have used a function 'pow' to find the cube of each digit. For its implementation, a header file 'Math.h' has been used.