Panjang int atau desimal

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