|
|
发表于 2020-9-28 23:13:48
|
显示全部楼层
0. long long int
1. 字符类型
2.不是
3. 8
4. 枚举类型
5. E、F
6.unsigned int
7.不知道
0.#include <stdio.h>
#include <math.h>
int main()
{
unsigned int sum;
sum = pow(1, 2) + pow(2, 3) + pow(3, 4) + pow(4, 5) + pow(5, 6);
printf("%d", sum);
return 0;
}
1.
#include <stdio.h>
#include <math.h>
int main()
{
int i, temp;
double weight;
long long int sum;
for (i=0; i < 64; i++)
{
temp = pow(2, i);
sum = sum + temp;
}
weight = sum / 25000;
printf("麦子:%d\n", sum);
printf("公斤:%.0f\n", weight);
return 0;
}
|
|