教程S1E6的题,为啥我得出来的结果是-1?
#include <stdio.h>#include <math.h>
int main (void)
{
int i;
unsigned long long int sum = 0, weight, temp;
for (i = 0; i < 64; i++)
{
temp = pow(2, i);
sum = sum + temp;
}
weight = sum / 25000;
printf ("%lli麦子\n", sum);
printf ("%lliKg\n", weight);
return 0;
}
为什么这个麦子的数量是-1?但是公斤数是对的? 搞清楚问题在哪了。{:10_251:}
页:
[1]