mathsarithmetic

add

Available under GPL (Free) and Commercial licence
get a GPL licence
COST (GBP)
this unit 1.34
sub units 0.00
add a commercial licence to your cart
0
viewed 8612 times and licensed 42 times
www.codecogs.com/d-ox/maths/arithmetic/add.php
Controller: CodeCogs    Contact Controller

Interface

#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.
Click for details on using CodeCogs in ExcelString cc_add (String a, String b, Integer base )
This function is available as a Microsoft Excel add-in.

Function Documentation

Add calculator to your site or email
 
std::stringaddstd::stringa
std::stringb
intbase = 10 )
This function calculates the addition of two long positive integers stored as character strings, in the given numerical base. The maximum number of digits of either the numbers is only limited by the amount of memory available.

Example:
#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;
}

Output:
The following is a base 8 operation
2323 + 1747 = 4272
Parameters:
athe first term
bthe second term
base Default value = 10
Returns:
a character string corresponding to the sum of the given numbers
Authors:
Anca Filibiu and Lucian Bentea (September 2005)
Source Code:
Register

- To get code register with CodeCogs. Already a Member, then Login.


Last Modified: 18 Oct 07 @ 17:07     Page Rendered: 2008-05-14 09:00:19

Page Comments

  You must login to leave a messge


Valid CSS!   Valid XHTML 1.0 Transitional