|
|
发表于 2020-10-26 09:08:59
|
显示全部楼层
本帖最后由 hx.123 于 2020-10-26 09:11 编辑
long long int
short int 2位
不是函数,是运算符
1024
_Bool
B D F
unsigned int
#include<stdio.h>
#include<math.h>
int main()
{
int sum;
sum = pow(1,2)+pow(2,3)+pow(3,4)+pow(4,5)+pow(5,6);
printf("sum=%d\n",sum);
return 0;
}
#include <stdio.h>
#include <math.h>
int main(int argc, char* argv[])
{
double sum=0,weight,temp=0;
int i;
for(i=0;i<65;i++)
{
sum=pow(2,i);
sum=sum+temp;
}
weight=sum/25000;
printf("舍罕王应该给予达依尔%.2f粒麦子!\n",sum);
printf("如果每25000粒麦子为1kg,那么应该给%.2f公斤麦子!\n",weight);
return 0;
}
|
|