假设对折一张厚度为0.1mm的纸,请问要对折多少次才能使纸的厚度从地球到达月球(假设地球到月球的距离为30万km)?
**输出格式要求:"%d"
#include<stdio.h>
#include<math.h>
#define a 0.1
#define b 300000000000
void main()
{int n;
n=log(b/a)/log(2);
n=n+1;
printf("%d",n);
}
假设对折一张厚度为0.1mm的纸,请问要对折多少次才能使纸的厚度从地球到达月球(假设地球到月球的距离为30万km)?
**输出格式要求:"%d"
#include<stdio.h>
#include<math.h>
#define a 0.1
#define b 300000000000
void main()
{int n;
n=log(b/a)/log(2);
n=n+1;
printf("%d",n);
}