From ff34c9a3f2108a39f3a79a36845eb0e40794d468 Mon Sep 17 00:00:00 2001 From: kid90 Date: Fri, 28 Feb 2020 11:07:49 -0300 Subject: [PATCH 1/3] Ajeitar repositorio --- ecma/basic-bmi/jean.carlos/bmi.js | 23 +++++++++++++++ .../jean.carlos/basic-harmonic-series.js | 9 ++++++ ecma/basic-hello/jean.carlos/hello.js | 2 ++ ecma/basic-irrf/jean.carlos/basic-irrf.js | 28 ++++++++++++++++++ .../jean.carlos/number-series.js | 29 +++++++++++++++++++ ecma/function-sum/jean.carlos/function-sum.js | 8 +++++ students/jean.carlos/20181780022.txt | 1 + 7 files changed, 100 insertions(+) create mode 100644 ecma/basic-bmi/jean.carlos/bmi.js create mode 100644 ecma/basic-harmonic-series/jean.carlos/basic-harmonic-series.js create mode 100644 ecma/basic-hello/jean.carlos/hello.js create mode 100644 ecma/basic-irrf/jean.carlos/basic-irrf.js create mode 100644 ecma/basic-numbers-series/jean.carlos/number-series.js create mode 100644 ecma/function-sum/jean.carlos/function-sum.js create mode 100644 students/jean.carlos/20181780022.txt diff --git a/ecma/basic-bmi/jean.carlos/bmi.js b/ecma/basic-bmi/jean.carlos/bmi.js new file mode 100644 index 0000000..60a7ff6 --- /dev/null +++ b/ecma/basic-bmi/jean.carlos/bmi.js @@ -0,0 +1,23 @@ +const weight = 100; +const height = 2; +const bmi = weight/height **2; + +let result; + +if (bmi<18.5) { + result = "Underweight" +} + +else if (bmi<24.9) { + result = "Normal Weight" +} + +else if (bmi<29.9) { + result = "Overweight" +} + +else { + result = "Obesity" +} + +console.log(result) \ No newline at end of file diff --git a/ecma/basic-harmonic-series/jean.carlos/basic-harmonic-series.js b/ecma/basic-harmonic-series/jean.carlos/basic-harmonic-series.js new file mode 100644 index 0000000..36d8417 --- /dev/null +++ b/ecma/basic-harmonic-series/jean.carlos/basic-harmonic-series.js @@ -0,0 +1,9 @@ +const n = 10; + +h = 0 + +for (let i = 1; i<=n; i++){ + h += 1/i +} + +console.log(h) \ No newline at end of file diff --git a/ecma/basic-hello/jean.carlos/hello.js b/ecma/basic-hello/jean.carlos/hello.js new file mode 100644 index 0000000..3b12510 --- /dev/null +++ b/ecma/basic-hello/jean.carlos/hello.js @@ -0,0 +1,2 @@ +const name = "Luiz Carlos"; +console.log(`Hello, ${name}!`); diff --git a/ecma/basic-irrf/jean.carlos/basic-irrf.js b/ecma/basic-irrf/jean.carlos/basic-irrf.js new file mode 100644 index 0000000..507fbe7 --- /dev/null +++ b/ecma/basic-irrf/jean.carlos/basic-irrf.js @@ -0,0 +1,28 @@ +const salario = 2000; + +if (salario <= 1903.98) { + ali = 0 + parc = 0 +} + +else if (salario<2826.65) { + ali = 7.5 + parc = 142.80 +} + +else if ( salario<3751.05){ + ali = 15.0 + parc = 354.80 +} +else if ( salario<4664.68){ + ali = 22.5 + parc = 636.13 +} +else { + ali= 27.5 + parc = 869.36 +} + +imposto = (salario * ali/100) - parc + +console.log(imposto.toFixed(2)) \ No newline at end of file diff --git a/ecma/basic-numbers-series/jean.carlos/number-series.js b/ecma/basic-numbers-series/jean.carlos/number-series.js new file mode 100644 index 0000000..96e1b40 --- /dev/null +++ b/ecma/basic-numbers-series/jean.carlos/number-series.js @@ -0,0 +1,29 @@ + +for (let i = 0; i<10; i++){ + result = "" + for (let j = 0; j<10; j++){ + result += i.toString()+j.toString()+" " + } + console.log(result) +} +console.log() +for (let i = 9; i>-1; i--){ + result = "" + for (let j = 9; j>-1; j--){ + result += i.toString()+j.toString()+" " + } + console.log(result) +} +console.log() +for (let i = 9; i>-1; i--){ + result = "" + for (let j = 9; j>-1; j-=2){ + result += i.toString()+j.toString()+" " + } + console.log(result) +} + + + + + diff --git a/ecma/function-sum/jean.carlos/function-sum.js b/ecma/function-sum/jean.carlos/function-sum.js new file mode 100644 index 0000000..2e6e579 --- /dev/null +++ b/ecma/function-sum/jean.carlos/function-sum.js @@ -0,0 +1,8 @@ +const n1 = 1; +const n2 = 2; + +function soma(m1, m2){ + return m1+m2 +} + +console.log(soma(n1, n2)) \ No newline at end of file diff --git a/students/jean.carlos/20181780022.txt b/students/jean.carlos/20181780022.txt new file mode 100644 index 0000000..0cddb77 --- /dev/null +++ b/students/jean.carlos/20181780022.txt @@ -0,0 +1 @@ +Jean Carlos Silva dos Santos Rodriguês From 9b8bd8ded58bf7a7ee2cfce53fc8df3b706956ca Mon Sep 17 00:00:00 2001 From: ifpb Date: Thu, 12 Mar 2020 12:27:19 -0300 Subject: [PATCH 2/3] divisao de function --- ecma/function-sum/jean.carlos/function-sum.js | 4 +--- ecma/function-sum/jean.carlos/sum.js | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 ecma/function-sum/jean.carlos/sum.js diff --git a/ecma/function-sum/jean.carlos/function-sum.js b/ecma/function-sum/jean.carlos/function-sum.js index 2e6e579..c39946e 100644 --- a/ecma/function-sum/jean.carlos/function-sum.js +++ b/ecma/function-sum/jean.carlos/function-sum.js @@ -1,8 +1,6 @@ const n1 = 1; const n2 = 2; -function soma(m1, m2){ - return m1+m2 -} +let soma = require("./sum") console.log(soma(n1, n2)) \ No newline at end of file diff --git a/ecma/function-sum/jean.carlos/sum.js b/ecma/function-sum/jean.carlos/sum.js new file mode 100644 index 0000000..a233cac --- /dev/null +++ b/ecma/function-sum/jean.carlos/sum.js @@ -0,0 +1,5 @@ +function soma(m1, m2){ + return m1+m2 +} + +module.exports = soma \ No newline at end of file From 244776d965f6f43f25f5ba36a645b8cfbcb59b04 Mon Sep 17 00:00:00 2001 From: kid90 Date: Fri, 13 Mar 2020 12:08:08 -0300 Subject: [PATCH 3/3] eu --- web/node-hello-simple/jean.carlos/app.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 web/node-hello-simple/jean.carlos/app.js diff --git a/web/node-hello-simple/jean.carlos/app.js b/web/node-hello-simple/jean.carlos/app.js new file mode 100644 index 0000000..0e7c959 --- /dev/null +++ b/web/node-hello-simple/jean.carlos/app.js @@ -0,0 +1,13 @@ +const http = require ("http"); + +const hostname = "127.0.0.1"; +const port = 3000; + +const server = http.createServer((req, res) => { + res.statusCode = 200; + res.setHeader("Content-Type", "tex/plain"); + res.end("Hello World"); +}); +server.listen(port, hostname, () => { + console.log(`Server running at http://${hostname}:${port}/`); + }); \ No newline at end of file