运行 ❯
建立您
自己的
网站
×
更改方向
更改主题,深色/浅色
前往 Spaces
#include <stdio.h> #include <math.h> int main() { double x = 1260.0; int digits = floor( log10( x ) ) + 1; printf("The number %f has %d digits.", x, digits); return 0; }
数字1260.000000有4位数字。