1.0.3 • Published 12 months ago

test_cal_ss v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

Calculator Module

This is a simple calculator module that provides basic arithmetic operations such as addition, subtraction, multiplication, and division.

Installation

To use this module, you need to have Node.js installed. You can include this module in your project by copying the code into a file named calculator.js.

Usage

  1. Create a file named calculator.js and paste the provided code for the calculator module.
  2. In your main project file, require the calculator module and use its methods for arithmetic operations.

API

The calculator module provides the following methods:

  • add(a, b): Returns the sum of a and b.
  • substract(a, b): Returns the difference of a and b.
  • multiplay(a, b): Returns the product of a and b.
  • divide(a, b): Returns the quotient of a and b.

Example

Here's an example of how to use the calculator module in your project:

  1. Create a calculator.js file with the module code.
  2. In your main file, require and use the calculator module to perform arithmetic operations.
const calculator = require('./calculator');

const num1 = 10;
const num2 = 5;

console.log(`Addition: ${calculator.add(num1, num2)}`); // Output: 15
console.log(`Subtraction: ${calculator.substract(num1, num2)}`); // Output: 5
console.log(`Multiplication: ${calculator.multiplay(num1, num2)}`); // Output: 50
console.log(`Division: ${calculator.divide(num1, num2)}`); // Output: 2
1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago