+ 2
Intergers have limits you need a different data type if you have enough digits.
https://www.tutorialspoint.com/cplusplus/cpp_data_types.htm
+ 5
Without code, might be an overflow if it always displays the same random number with the same large insert.
Got a CodePlayground link?
+ 4
@Manual...I've been sitting with this in my clipboard because I'm having some trouble with both of yours's code:
==============
Integers are 4 bytes on this platform. 4 bytes = 32 bits = 2^32 = 4294967296.
You're using signed integers, so divide that in half:
2,147,483,648..... trails off to try code....
==================
When I enter 10000000000, as in the question statement (and regardless of any other values, even incomplete input), the min/max ceilings to integer (not long) max and all the other cins appear to be nonfunctional.
Just FYI.
+ 4
Yep, that's what I was fiddling with:
int i; long l; unsigned long long ull;
cout << sizeof those
4, 4, 8
Anyway, learned something .... longs and ints not different here.
Thanks @Manual.
+ 3
Christos
10000000000 is too large to be an interger
use a template or decimal instead of int.
+ 3
@Kirk
You're welcome!
+ 2
+ 2
I adjusted the range
try this
https://code.sololearn.com/cp2qYDcwUFmO/?ref=app
+ 2
@Christos
Please do not forget to give the checkmark, to the one who helped you.
+ 2
Try the update long long
- bigger range
+ 1
share your code
[ +insert ]
-add code
|
|
\/
+ 1
You're welcome!😸
+ 1
did you try the new version?
edit
I tried it
seems like the limit was reached...