I tried to print the result of 99,999 * 99,999 * 99,999
, the result should have been 999,970,000,299,999
but what got printed instead was 18446744072244127711
. I tried to print 20000 * 20000 * 20000
and the result was pretty much the same. Can you guys tell me how to get the real result?
#include <stdio.h>
int main()
{
int num;
printf("Insert number : ");
scanf("%ld", &num);
fflush(stdin);
unsigned long long int total = num * num * num;
printf("Result : %llu", total);
getchar();
return 0;
}