Longitud de int o decimal

#include<cmath>
    ...
    int size = trunc(log10(num)) + 1
....
Glamorous Goose