You see that code I asked you to copy-paste into your shell, a few posts back, there?
Copy-paste it into your shell, please. Don't type it.
Copy-paste.
---------- Post updated at 04:55 PM ---------- Previous update was at 04:14 PM ----------
Quote:
Originally Posted by
omega666
strange, when i change the number to 1000000000, it comes out ok
so if i go over a certain number i get these warnings
Your code wasn't actually giving wrong numbers for 1234512345?
When a program doesn't work as you expect,
post the literal program. It works for 1234512345, it works for 1000000000, but it won't work for anything bigger than 4 billion because you run out of room in an unsigned integer. If you dont't post what you actually did, how am I supposed to guess what went wrong?
To print longer integers, you have to start using 64-bit integer types like int64_t from stdint.h and I don't know of any portable way to print those.