+ 3
Why does this stop
why does the pattern change when it exceeds 1 billion? https://code.sololearn.com/cEPfPq4AN5wg/?ref=app
4 Réponses
+ 5
Your integer simply can't store higher numbers. You could use unsigned long long or uint64_t + stdint.h header to get the largest possible int value (64bit => 2^64)
+ 6
You've exceeded the maximum number for a long int.
You can try an unsigned long long to increase this range. Edit: Dang, Aaron beat me to it.
Or, you can use a string and add '0' to the end of it each time.
Here is an example with strings:
https://code.sololearn.com/cP1SJEIXKtNb/?ref=app
+ 3
Aaron Eberhardt thanks❤
+ 3
Rrestoring faith nice idea👌.. thanks❤