Files
BasicsOfComputerSoftwareEng…/POP/07/Optional01.c
2023-02-21 10:56:54 +08:00

12 lines
218 B
C

#include <stdio.h>
#include <math.h>
int main() {
int i = 1;
double count = 0;
for (; i < 1001; i++) {
count += log10(i);
}
printf("1000! has %d digits.", ((int)count) + 1);
return 0;
}