Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Adding big numbers using only strings?

Tags:

string

c#

I am trying to write a program that sums very big numbers (I am trying to solve a problem on projecteuler.net), so I cannot parse them into number types. So I was wondering if it is possible to sum such numbers using only strings or something like that?

like image 356
Nisal Avatar asked Sep 29 '26 13:09

Nisal


1 Answers

Try using BigInteger instead. It effictively lets you use integers of arbitrary size.

like image 138
Zach Sadler Avatar answered Oct 01 '26 02:10

Zach Sadler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!