#include <codecogs/maths/arithmetic/add.h>
using namespace Maths::Arithmetic;
| std::string | add (std::string a, std::string b, int base = 10) Performs the addition of two long positive integers in the given base. | |
| String | cc_add (String a, String b, Integer base ) This function is available as a Microsoft Excel add-in. |
| std::stringadd( | std::string | a | |
| std::string | b | ||
| int | base = 10 | ) |
#include <codecogs/maths/arithmetic/add.h> #include <iostream> int main() { std::string a("2323"), b("1747"), c = Maths::Arithmetic::add(a, b, 8); std::cout << "The following is a base 8 operation" << std::endl; std::cout << a << " + " << b << " = " << c << std::endl; return 0; }
The following is a base 8 operation 2323 + 1747 = 4272
| a | the first term |
| b | the second term |
| base | Default value = 10 |