|
|
发表于 2026-7-13 16:49:24
|
显示全部楼层
0.long long int
1.char
2.是
3.1 Byte =8 bit
4.(?)
5.F
6.unsigned int
动动手
0.#include <stdio.h>
#include <math.h>
int main()
{
int a,b,c,d,e,f;
a = pow(1,2);
b = pow(2,3);
c = pow(3,4);
d = pow(4,5);
e = pow(5,6);
f = a+b+c+d+e;
printf(" 1^2 + 2^3 + 3^4 + 4^5 + 5^6 的值为%d\n",f);
return 0;
}
1.#include <stdio.h>
#include <math.h>
int main()
{
long long sum,temp,weight,i;
sum=0;
for (i=0; i < 64; i++)
{
temp = pow(2,i);
sum = sum +temp;
}
weight = sum / 25000;
printf("舍罕王应给予达依尔%d粒麦子!\n",sum);
printf("如果每25000粒麦子重1kg,那么应该给%d公斤麦子!\n",weight);
return 0;
} |
|