maTH
  • 👋Welcome!
  • 🗿Installation
  • Reference
    • 😱Mathematical operations
      • add
      • pascal
      • factorial
      • factorialL
      • GCD
      • LCM
      • pow
      • permutations
      • combinations
      • combinationsWithRep
      • subtract
      • multiply
      • divide
      • sin
      • cos
      • ln
      • log
      • radToDeg
      • degToRad
      • mod
      • abs
      • floor
      • ceil
      • root
      • exp
      • tan
      • arcsin
      • arccos
      • arctan
      • sinh
      • cosh
      • round
    • 🥶Statistics
      • Binomial
      • Poisson
      • Geometric
      • Pascal
      • Hypergeometric
      • Exponential
      • Uniform
    • 🥵Data structures
      • Stack
      • Queue
      • LinkedList
    • 🤓Algorithms
      • Bubble sort
      • Insertion sort
      • Selection sort
      • Merge sort
      • Quicksort
      • Heap sort
      • Count sort
      • Bucket sort
      • Radix sort
    • 😳Constants
Powered by GitBook
On this page
  1. Reference
  2. Mathematical operations

multiply

Multiply any two numbers

multiply<return_type>(a, b);

will return the product of the two given numbers. The return_type specifies in which data type the multiplication will be returned in, like shown in below example:

multiply<int>(7.89, 6); //42
multiply<float>(3.21, 12); //38.52
multiply<bool>(-1, 5); //1, AND operator
------------------------
multiply<char>('a', 'b'); //'"'

Typically multiplication works only for numeric data types, but in this case, you have an additional option for characters. Before using it in that way, please test it before actually implementing something.

PrevioussubtractNextdivide

Last updated 11 months ago

😱