|
|
发表于 2018-9-3 22:46:15
|
显示全部楼层
上面回答不下心覆盖了 所以题目重新做一遍
0.long long int 取值范围-2^63至2^63 ,unsigned long long int 取值范围0至2^64
1._Bool 只存0和1
2.sizeof()打印数据类型或对象占用多少字符
3.一字节等于8比特位
4.char 字符,c标准只规定char类型占一个字节的空间,其他数据类型均指定相对范围,具体大小依赖于实体环境。
5.e f
6.unsigned int 取值范围 0~2^32-1 int取值范围 -2^31-1~2^31-1
7.程序员怎么设计 程序就会怎么走
动动手
0.
#include <stdio.h>
#include <math.h>
int main()
{
int i;
i=pow(1,2)+pow(2,3)+pow(3,4)+pow(4,5)+pow(5,6);
printf("%d\n",i);
}
1.
#include <stdio.h>
#include <math.h>
int main()
{
unsigned long long sum=0;
unsigned long long temp;
unsigned long long weight;
int i;
for(i=0;i<64;i++)
{
temp=pow(2,i);
sum+=temp;
}weight=sum/25000;
printf("汉奸王应该给与达依尔%llu粒麦子\n",sum);
printf("如果每25000粒麦子位1Kg,那么应该给%llu公斤麦子\n",weight);
} |
|