Today's problem is a simple one but it will require a language which places restrictions on integer sizes such as C. The goal is to set an int to 1 and then double it until overflows. When the int overflows print out the number. Alternatively you can solve this by hand. Assume 32 bit signed integer.
Comments:
Anonymous - 9 years, 11 months ago
C#
reply permalink
17 minutes ago - 9 years, 11 months ago
Javascript
reply permalink
Anonymous - 9 years, 11 months ago
Python
Gives the answer: 10141204801825835211973625643008
reply permalink
David - 9 years ago
While a decent idea, you have a 32 digit number, not a 32 bit number.
reply permalink
Eddy - 9 years, 11 months ago
My solution in C.
reply permalink