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 - 10 years, 1 month ago
C#
reply permalink
17 minutes ago - 10 years, 1 month ago
Javascript
reply permalink
Anonymous - 10 years, 1 month ago
Python
Gives the answer: 10141204801825835211973625643008
reply permalink
David - 9 years, 2 months ago
While a decent idea, you have a 32 digit number, not a 32 bit number.
reply permalink
Eddy - 10 years, 1 month ago
My solution in C.
reply permalink