-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Primera version del modulo de matematicas basica OK
- Loading branch information
Showing
3 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
module.exports = { | ||
/** | ||
* Suma de dos numeros | ||
* @example | ||
* n1 = 1 , n2 = 3 = > resultado 4 | ||
* @param {*} n1 Numero uno de la suma | ||
* @param {*} n2 Numero dos de la suma | ||
*/ | ||
suma: function (n1, n2) { | ||
return n1 + n2; | ||
}, | ||
/** | ||
* Resta de dos numeros | ||
* @example | ||
* n1 = 1 , n2 = 3 = > resultado -2 | ||
* @param {*} n1 Numero uno de la resta | ||
* @param {*} n2 Numero dos de la resta | ||
*/ | ||
resta: function (n1, n2) { | ||
return n1 - n2; | ||
}, | ||
/** | ||
* Multiplicacion de dos numeros | ||
* @example | ||
* n1 = 1 , n2 = 3 = > resultado 3 | ||
* @param {*} n1 Numero uno de la multiplicacion | ||
* @param {*} n2 Numero dos de la multiplicacion | ||
*/ | ||
multiplicacion: function (n1, n2) { | ||
return n1 * n2; | ||
}, | ||
/** | ||
* Division de dos numeros | ||
* @example | ||
* n1 = 1 , n2 = 3 = > resultado 0.33 | ||
* @param {*} n1 Numero uno de la Division | ||
* @param {*} n2 Numero dos de la Division | ||
*/ | ||
division: function (n1, n2) { | ||
return n1 / n2; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "proyecto-1a-matematicas", | ||
"version": "1.0.0", | ||
"description": "Proyecto de matemáticas sencillo para aprender NodeJS y subirlo a NPM", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/npm-js-ts-angular-modules-course/proyecto-1a-matematicas.git" | ||
}, | ||
"keywords": [ | ||
"math", | ||
"matematica", | ||
"suma", | ||
"resta", | ||
"division", | ||
"multi", | ||
"basico" | ||
], | ||
"author": "Anartz Mugika <mugan86@gmail.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/npm-js-ts-angular-modules-course/proyecto-1a-matematicas/issues" | ||
}, | ||
"homepage": "https://github.com/npm-js-ts-angular-modules-course/proyecto-1a-matematicas#readme" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const m = require('.'); | ||
|
||
console.log(m.suma(1,2)); | ||
|
||
console.log(m.suma(1,2)); | ||
|
||
console.log(m.resta(11,24)); | ||
console.log(m.resta(1,2)); | ||
console.log(m.multiplicacion(1,24)); | ||
console.log(m.multiplicacion(1,2)); |