Created
April 28, 2020 00:22
-
-
Save Soffcsr/86c732159802c48c0d9bf608a16c8915 to your computer and use it in GitHub Desktop.
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
//modulos CORE | |
var os = require('os'); | |
var fs = require('fs'); | |
//modulos propios | |
var [suma, resta, multiplicacion, division] = require('./operaciones'); | |
var cpu = os.cpus(); | |
var cpu_string = JSON.stringify(cpu); | |
var sistema = os.platform(); | |
var hostname = os.hostname(); | |
fs.appendFile('salida.txt', `OPERACIONES suma: ${suma(10, 2)}, resta: ${resta(10, 2)}, multiplicacion: ${multiplicacion(10, 2)}, division: ${division(10, 2)}, COMPUTADORA DE: cpus: ${cpu_string}, SO: ${sistema}, hostname: ${hostname}`, function(error){ | |
if(error){ | |
console.log("Error al crear el archivo."); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment