|
|
发表于 2019-11-19 22:15:39
|
显示全部楼层
0.long long int
1._Bool
2.不,是运算符
3.8
4.
5.b,e,f
6.unsigned int
7.有局限性
0.
#include <stdio.h>
#include <math.h>
int main(){
long int result;
result = pow(1,2)+pow(2,3)+pow(3,4)+pow(4,5)+pow(5,6);
printf("%ld",result);
return 0;
}
1.
#include <stdio.h>
#include <math.h>
int main(){
unsigned long long weight,i;
long double sum=0,temp;
for(i=0; i<64; i++){
temp = pow(2,i);
sum = sum + temp;
}
weight=sum/25000;
printf("%Lf粒麦子\n",sum);
printf("%lld公斤\n",weight);
return 0;
} |
|