12 lines
218 B
C
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;
|
|
} |