mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-05 11:40:46 +08:00
Update math/magic_number.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
@@ -34,7 +34,7 @@ bool magic_number(const uint64_t &n) {
|
||||
return false;
|
||||
}
|
||||
// result stores the modulus of @param n with 9
|
||||
int result = n % 9;
|
||||
uint64_t result = n % 9;
|
||||
// if result is 1 then the number is a magic number else not
|
||||
if (result == 1) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user