|
|
发表于 2020-6-6 18:21:17
|
显示全部楼层
0、
long long int
1、
_Bool类型
2、
sizeof是一个运算符
3、
一个字节等于八位
4、
_Bool类型规定等于一个字节
5、
B只能跟变量名,而不是数字
D只能是变量的名称不能是变量本身
E int余姚括号
F sizeof不能分开
6、int能表示更大的整数
7、程序根据人编写的代码执行,没有自我思维,因此不会说谎
0、
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int result;
result = pow(1, 2) + pow(2, 3) + pow(3, 4) + pow(4, 5) + pow(5, 6);
printf("result = %d\n", result);
system("pause");
return 0;
}
1、
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int i;
double temp;
double weight;
double result = 0;
for (i = 0; i < 64; i++)
{
temp = pow(2, i);
result = result + temp;
}
weight = result / 25000;
printf("舍罕王应该给予答伊尔%.0f粒麦子!\n", result);
printf("如果每公斤麦子有25000粒,那么应该给%.0f公斤麦子!\n", weight);
system("pause");
return 0;
} |
|