fix: changed to std::pow

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
This commit is contained in:
Neeraj C 2020-06-25 10:59:44 +05:30 committed by GitHub
parent 06ca2a6953
commit 06f425493b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ bool is_armstrong(int number) {
while (temp > 0) {
int rem = temp % 10;
// Finding each digit raised to the power total digit and add it to the total sum
sum = sum + pow(rem, total_digits);
sum = sum + std::pow(rem, total_digits);
temp = temp / 10;
}
return number == sum;