|
|
发表于 2020-5-8 21:08:47
|
显示全部楼层
0、long long int
1、short int
2、用于获取数据类型的尺寸
3、一字节等于八比特
4、char???
5、 B F
6、unsigned int
7、 ???
0、16739
#include <stdio.h>
#include <math.h>
int main(void)
{
int i;
i = pow(1,2) + pow(2,3) + pow(3,4) + pow(4,5) + pow(5,6);
printf("结果为%d",i);
return 0;
}
1、
#include <stdio.h>
#include <math.h>
int main(void)
{
double sum,temp,weight,i;
for(i=0;i < 64;i++)
{
temp = pow(2,i);
sum = sum + temp;
}
weight = sum / 25000;
printf("设汉王应该给予%.1f粒种子!\n",sum);
printf("如果每25000粒种子为1kg,那么应该给%.1fkg种子",weight);
return 0;
}
|
|