Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exercicios #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions exercicio1/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

//exercicio A
function imprimirOla(nome){
console.log("Ola", nome )
}

imprimirOla("Daniela")

//exercicio B

const calculadora = (num1) =>{
const multiplica= num1 * 1
const multiplica2 = num1 *2
const multiplica3= num1 *3
const multiplica4=num1 * 4
const multiplica5 = num1*5
const multiplica6 =num1*6
const multiplica7=num1*7
const multiplica8=num1*8
const multiplica9 =num1*9
const multiplica10 = num1*10
console.log(multiplica,multiplica2,multiplica3,multiplica4,multiplica5,multiplica6
,multiplica7,multiplica8,multiplica9,multiplica10)
}

calculadora(10)
calculadora(23)
calculadora(59)

//exercicio C
//exercicio A arrow function
const imprimeOla=(nome)=>{
console.log("Ola",nome)}

imprimeOla("Daniela")

//exercicio B funcao nomeada

function conta (num1){
const multiplica= num1 * 1
const multiplica2 = num1 *2
const multiplica3= num1 *3
const multiplica4=num1 * 4
const multiplica5 = num1*5
const multiplica6 =num1*6
const multiplica7=num1*7
const multiplica8=num1*8
const multiplica9 =num1*9
const multiplica10 = num1*10
console.log(multiplica,multiplica2,multiplica3,multiplica4,multiplica5,multiplica6
,multiplica7,multiplica8,multiplica9,multiplica10)
}

calculadora(0)
calculadora(34)
calculadora(9)
39 changes: 39 additions & 0 deletions exercicio2/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// exercicioA

const soma =(num1 , num2)=>{
const soma1= num1 + num2
console.log (soma1)

}

soma(9,10)
soma(234345674,345234)

//exercicioB

const diferenca=(num1,num2)=>{
const maioOuIgual = num1 >= num2
console.log(maioOuIgual)
}

diferenca(5,23)

//exercicioC
const par= (num1)=>{
const checkPar= num1 % 2
const verificarPar=checkPar===0
console.log(verificarPar)
}

par(2)

//exercicioD

const salario=(num1)=>{
const inss= num1 * 0.10
const diferenca = num1 - inss
console.log(diferenca)
}

salario(1500)

36 changes: 36 additions & 0 deletions exercicio3/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
function soma (num1,num2){
return num1 + num2
}

function multiplica (num1 , num2){
return num1 * num2
}

function divide (num1 ,num2){
return num1 / num2
}
function subtrai (num1 , num2){
return num1-num2
}

const num1=Number(prompt("Digite um numero aqui!!"))
const num2 =Number(prompt("Digite outro numero!!"))

soma (num1, num2)
multiplica(num1,num2)
divide(num1,num2)
subtrai(num1,num2)


const resultado1=soma(num1,num2)
console.log(resultado1)

const resultado2=multiplica(num1,num2)
console.log(resultado2)

const resultado3=divide(num1,num2)
console.log(resultado3)

const resultado4=subtrai(num1,num2)
console.log(resultado4)