|
|
发表于 2021-1-17 15:23:09
|
显示全部楼层
0.long long int
1.char
2.不是
3.8
4.
5.C、D、F
6.unsigned int
0.
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- printf("%.0f",pow(1,2) + pow(2,3) + pow(3,4)\
- + pow(4,5) + pow(5,6));
- return 0;
- }
复制代码
1.
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- unsigned long long temp;
- unsigned long long sum = 0;
- unsigned long long weight;
- int i;
-
- for (i=0;i<64;i++)
- {
- temp = pow(2,i);
- sum = sum + temp;
- }
-
- weight = sum / 25000;
-
- printf("舍汉王应该给予达依尔%llu粒麦子!\n",sum);
- printf("如果每25000粒麦子为1kg,那么应该给%llu公斤麦子",weight);
-
- return 0;
- }
复制代码 |
|