|
|
发表于 2019-3-14 17:20:47
|
显示全部楼层
0. long long int
1. 字符类型
2. 是 计算空间大小的函数
3. 8
4. char类型
5. BF
6. int
7.
动动手
0. #include <stdio.h>
int main()
{
int sum;
sum=pow(1,2)+pow(2,3)+pow(3,4)+pow(4,5)+pow(5,6);
printf("1^2+2^3+3^4+4^5+5^6=%d\n",sum);
return 0;
}
1. #include <stdio.h>
#include <math.h>
int main()
{
long long int sum;
long long int temp;
long long int weight;
int i;
for(i=0;i<64;i++)
{
temp=pow(2,i);
sum=sum+temp;
}
weight=sum/25000;
printf("舍罕王应该给予达依尔%lld粒麦子!\n",sum);
printf("如果每25000麦子为1kg,那么应该给%lld公斤麦子!\n",weight);
return 0;
}
|
|