rename Dynamic Programming -> dynamic_programming (#645)

* rename Dynamic Programming -> dynamic_programming

* rename dynamic-programming -> dynamic_programming
This commit is contained in:
Christian Clauss
2019-11-28 13:29:01 +01:00
committed by GitHub
parent fc7e416030
commit 5c241487aa
16 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
//program to check whether a number is an armstrong number or not
#include <iostream.h>
#include <Math.h>
int main()
{
int n, k, d, s = 0;
cout << "Enter a number:";
cin >> n;
k = n;
while (k != 0)
{
d = k % 10;
s += (int)pow(d, 3);
k /= 10;
}
if (s == n)
cout << n << "is an armstrong number";
else
cout << n << "is not an armstrong number";
}