1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
emmasim [6.3K]
2 years ago
8

Implemente a função ao lado, que recebe um preço e um booleano indicando se já está com desconto ou não. Se o preço for maior qu

e 100 e não estiver com desconto, a função deve retornar Quero pechinchar. Caso contrário, deve retornar Negócio fechado.
isso é javascript, se estiver algum deus da programação me ajude eu travei nesse exercicio <3
Computers and Technology
1 answer:
Andrew [12]2 years ago
7 0

Answer:

function pecoDesconto(preco, estaComDesconto) {

 

 let p = preco;

 let desconto = estaComDesconto;

 if(p > 100 && desconto == false){

   return "Quero pechinchar";

 }else{

   return "Negócio fechado";

 }

}

Explanation:

function pecoDesconto(preco, estaComDesconto) {

 

 // Implemente a função ao lado, que recebe um preço//

 let p = preco;

// variavel que indica desconco//

 let desconto = estaComDesconto;

//Se o preço for maior que 100 e não estiver com desconto, a função deve retornar Quero pechinchar.//

 if(p > 100 && desconto == false){

   return "Quero pechinchar";

   //Caso contrário, deve retornar Negócio fechado

 }else{

   return "Negócio fechado"

 }

}

só te faltou ler com atenção, e um pouco de logica!

You might be interested in
When can screentips be useful? when finding a tab when looking for a command when pinning the ribbon when using a command.
Anettt [7]

Screentips be useful when looking for a command.

<h3>What are Screentips?</h3>

These are referred to small windows which displays descriptive text when the pointer is rested on a command and it is usually done using the mouse.

Screentips is therefore useful when an individual is looking for a command as a result of the information derived from the descriptive texts.

Read more about Screentips here brainly.com/question/18955460

6 0
2 years ago
A web designer is creating a web site and wants each browser to resize the text size to look the same in each device. what measu
adelina 88 [10]
The designer could use the measurements in pixels. 
4 0
3 years ago
A type of bridge that relies on a curved, semi-circular structure for support
inna [77]
Arch bridges have a semicirclar, curved support.
8 0
3 years ago
You were fortunate to get the ice off of the wings, but whatever caused the cabin to depressurize also vented all of your fuel o
torisob [31]

Answer:

A speed govenor

Explanation:

speed governor is an electronic device linked to the gearbox where sensors capture the movement of the vehicle. If the vehicle exceeds the specified speed limit, the device automatically slows the vehicle.

4 0
3 years ago
Create a class called Fraction. Provide a constructor that takes 2 integers. Provide methods for:
tekilochka [14]

Answer:

Explanation;

else

System.out.println("f1 and f2 are not equal");

switch (input.charAt(0)

{

case '+':

f3 = f1.add(f2);

System.out.println("f1+f2=" + f3);

break;

case '-':

f3 = f1.subtract(f2);

System.out.println("f1-f2=" + f3);

break;

case '*':

f3 = f1.multiply(f2);

System.out.println("f1*f2="+f3);

break;

case '/':

f3 = f1.divide(f2);

System.out.println("f1/f2="+f3);

break;

default:

System.out.println("Illegal command: " + input );

break;

}

}// end of while loop

} // end of main

}

 

Note ; this is the last part of the programme check the attachment from 1-5  this is the 6th .

8 0
2 years ago
Other questions:
  • What is the most effect way to include space after each paragraph
    14·1 answer
  • Approximately what percent of desktop PCs are used for work-related purposes?
    13·2 answers
  • Explain each of the three important concepts behind the Federal Networking Council's definition of the term Internet. Explain ho
    8·1 answer
  • A process that rearranges the data and objects in a database to decrease its file size, thereby making more space available on y
    11·1 answer
  • Read each statement below. If the statement describes a peer-to-peer network, put a P next to it. If the statement describes a s
    12·1 answer
  • Sean Cody is a website most known for what?
    9·2 answers
  • What happens when text is added to grouped objects that is larger than an object ?
    9·2 answers
  • How you use ict today and how will you use it tomorrow
    14·1 answer
  • Ok so I’m using a word document and towards the bottom of the page it stops me from moving my text box any further down even tho
    13·2 answers
  • A ____ is an Access feature that makes it easy to enter data.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!