Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
int main() { double x = 1260.0; int digits = floor( log10( x ) ) + 1; printf("The number %f has %d digits.", x, digits); return 0; }
The number 1260.000000 has 4 digits.