UNPKG

samar-package

Version:
20 lines (16 loc) 484 B
const readline = require("readline-sync"); function Summation() { let a = Number(readline.question("Enter the first number: ")); let b = Number(readline.question("Enter the second number: ")); return a + b; } function Difference() { let a = Number(readline.question("Enter the first number: ")); let b = Number(readline.question("Enter the second number: ")); return a - b; } // Export both functions module.exports = { Summation, Difference, };