Skip to content

The solution done by me in C# on the challenge "Adding Big Numbers" over at www.codewars.com

Notifications You must be signed in to change notification settings

IvanovArtyom/Adding-Big-Numbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description:

We need to sum big numbers and we require your help.

Write a function that returns the sum of two numbers. The input numbers are strings and the function must return a string.

Example

add("123", "321"); -> "444"
add("11", "99");   -> "110"

Notes

  • The input numbers are big.
  • The input is a string of only digits.
  • The numbers are positives.

My solution

using System.Numerics;

public class Kata
{
    public static string Add(string a, string b)
    {
        BigInteger A = BigInteger.Parse(a);
        BigInteger B = BigInteger.Parse(b);

        return (A + B).ToString();
    }
}

About

The solution done by me in C# on the challenge "Adding Big Numbers" over at www.codewars.com

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages