How do I do to handles some big positive integers (like 9,999,999,999) on Visual C++ 2008 on a 32-bit PC.
Please give an example on declaring, printf, scanf of these big positive integers.
Please consider using 9,999,999,999 in your example.
views:
143answers:
1
+3
A:
unsigned long long foo;
scanf("%llu", &foo);
printf("%llu", foo);
Andreas Brinck
2009-11-30 12:02:06
That should be `%lld`, since you have declared it as signed rather than unsigned.
caf
2009-11-30 12:14:08
Thanks, changed foo's definition to unsigned, since the question stated that the numbers were positive
Andreas Brinck
2009-11-30 12:17:07
Thanks you guys!
yihang
2009-11-30 12:18:39