Hi,
Try this:
string str1="4567995244...4457";
string str2="1458795568...85498";
decimal d1 = Convert.ToDecimal(str1);
decimal d2 = Convert.ToDecimal(str2);
decimal addition = d1+d2;
decimal difference = d1-d2;
decimal multiplication = d1*d2;
decimal division = d1/d2;
[EDIT]
I've read your comment. So, this is my edit.
Orhss wrote:
note: we dont use biginteger class also
I think there's no other option then using a
BigInteger
. Add a reference to System.Numerics.dll, add
using System.Numerics;
to the top of your code file, and then use this code:
BigInteger b1 = BigInteger.Parse(str1);
BigInteger b2 = BigInteger.Parse(str2);
BigInteger addition = b1 + b2;
BigInteger difference = b1 - b2;
BigInteger multiplication = b1 * b2;
BigInteger division = b1 / b2;
Hope this helps.