|
|
发表于 2016-3-24 13:49:15
|
显示全部楼层
本帖最后由 Soooy 于 2016-3-24 14:08 编辑
0.long long int
1.char
2. no
3. 8
4.char
5.EF
6.unsigned int
7.8483
- #include<stdio.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("resule = %d\n",result);
- return 0;
- }
复制代码
1
普该- #include<stdio.h>
- #include<math.h>
- int main()
- {
- int i;
- unsigned long long sum=0,weight,temp;
- for (i=0; i<64; i++)
- {
- temp = pow(2,i);
- sum = sum +temp;
- }
- weight = sum / 25000;
- printf("the king should pay%llu\n",sum);
- printf("%llu kg!",weight);
- return 0;
- }
复制代码 |
|