Calculator: Math


Requirements

Build a simple calculator to compute basic math operations.

Input

  • Numbers

Process

  • Several functions to run different kind of operations

Output

  • Calculated numbers

Level 0

  • Prepare all basic math operations you already learnt

Level 1

  • Wrap those operations into different kind functions
function add(...) { ... }
function substract(...) { ... }
function multiply(...) { ... }
function divide(...) { ... }
function modulo(...) { ... }

Level 2

  • Experiment to call some chain of different functions in other functions
add(substract(...), divide(...))