ismail-cal
v1.0.2
Published
calculator
Readme
README.md
Calculator Module
This module provides basic arithmetic operations such as addition, subtraction, multiplication, and division.
Functions:
- add(a, b): Adds two numbers
aandband returns the result. - subtract(a, b): Subtracts
bfromaand returns the result. - multiply(a, b): Multiplies
abyband returns the result. - divide(a, b): Divides
abyband returns the result.
Usage:
const calculator = require("./calculator");
let add = calculator.add(5, 3); // Output: 8
let sub = calculator.subtract(10, 4); // Output: 6
let mul = calculator.multiply(2, 6); // Output: 12
let div = calculator.divide(10, 2); // Output: 5