|
|
发表于 2020-11-8 03:32:45
|
显示全部楼层
0. long long int
1. char _Bool
2. 没理由认为不是
3. 8
4. _Bool ?
5. E
6. unsigned int
7. 如果程序出错了,一定是代码的问题
动动手
0.
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- int result;
- result = pow(1, 2) + pow(2, 3) + pow(4, 5) + pow(5, 6);
- printf("结果是:%d\n", result);
-
- return 0;
- }
复制代码
1.
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- int i;
- unsigned long long sum=0;
- unsigned long long temp;
- unsigned long long weight;
- for (i=0; i < 64; i++)
- {
- temp = pow(2, i);
- sum = sum + temp;
- }
- weight = sum / 25000;
- printf("舍罕王应该给予达依尔%llu粒麦子!\n", sum);
- printf("如果每25000粒麦子为1kg,那么应该给%lld公斤麦子!\n", weight);
- return 0;
- }
复制代码 |
|