Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
A happy number is a number whose sum of digits is calculated until the sum is a single digit, and this sum turns out to be 1. More...
#include <iostream>
Functions | |
template<typename T > | |
bool | is_happy (T n) |
int | main () |
A happy number is a number whose sum of digits is calculated until the sum is a single digit, and this sum turns out to be 1.
bool is_happy | ( | T | n | ) |
Checks if a decimal number is a happy number
int main | ( | void | ) |
Main function