Ok so my teacher said he did this challenge where you would have to add all the digits of a number up, but hes the catch you have to do it for the number 2^100 which is 31 digits long. So i wanted to solve this as well.
I originally tried a long, that was too short, then i tried a ulong still too short, then I tried a double, long enough but not precise enough I cant add the first few digits, I then tried a decimal, and although it is precise enough it doesnt store enough to hold the number, does anyone have a solution. Im doing it in C sharp, my teacher did it in visual basic.
I originally tried a long, that was too short, then i tried a ulong still too short, then I tried a double, long enough but not precise enough I cant add the first few digits, I then tried a decimal, and although it is precise enough it doesnt store enough to hold the number, does anyone have a solution. Im doing it in C sharp, my teacher did it in visual basic.