0

i want to ask how i am able to multiply large numbers in C#. If i had

string firstNumber = 135923852358239582395823952382395823951825873295723957623875623857263587236589273567283562835726385723656827356235235; string secondNumber= 135923852358239582395823952382395823951825873295723957623875623857263587236589273567283562835726385723656827356235235; 

i want to do this firstNumber * Second Number

6
  • 9
    You could parse them into BigInteger. Console.WriteLine(BigInteger.Parse(firstNumber) * BigInteger.Parse(secondNumber)); Commented Jun 2, 2016 at 17:36
  • btw you missed double quotes for strings. Commented Jun 2, 2016 at 17:38
  • 1
    Also: stackoverflow.com/q/279038/447156 Commented Jun 2, 2016 at 17:41
  • You don't. Those number are bigger then big integer. Why would you need to multiply number that big? Commented Jun 2, 2016 at 17:48
  • 1
    @Paparazzi No they're not. The answer (via parsing to BigInteger) is 18475293639904512084559159038493973411283439804954005546376625603615812799023790492467237643300612205082402966970756925004844150484699383955740178979751400427519750333764207395320715014879702523078179084504091642998778302232655505225 Commented Jun 2, 2016 at 17:52

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.