|
|
发表于 2020-11-29 22:41:34
|
显示全部楼层
0.long long int
1.char, _Bool
2.是的
3.不知道呢
4.enum?_Bool?
5.F
6.int范围更大,比大小的话都一样
7.只有true or false
0.
#include<stdio.h>
#include<math.h>
int main()
{
int w;
w=pow(1,2)+pow(2,3)+pow(3,4)+pow(4,5)+pow(5,6);
printf("%d",w);
return 0;
}
1.
#include<stdio.h>
#include<math.h>
int main()
{
int sum=0;
int temp;
int weight;
int i;
for(i=0;i<=64;i++)
{
temp=pow(2,i);
sum=sum+temp;
}
weight=sum/25000;
printf("舍罕王应该给予达依尔%d粒麦子\n",sum);
printf("如果每25000粒麦子为1kg,那么应该给%d公斤麦子",weight);
return 0;
} |
|