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
An incurred cost that cannot be recovered, which is irrelevant for all decisions about the future, is included in the projected
iragen [17]

Answer:

An incurred cost that cannot be recovered, which is irrelevant for all decisions about the future, is included in the projected cost of a project. According to "Thinking Like an Economist," this an example of:<u> Failing to ignore sunk costs</u>

Explanation:

A sunk cost is a cost that cannot be recovered or changed and is independent of any future costs a business may incur. Since decision-making only affects the future course of business, sunk costs should be irrelevant in the decision-making process

3 0
3 years ago
What considerations should you make when deciding on the size of a table?
Kisachek [45]

Answer:

You should consider the number of cells needed for data, labels, titles, and formulas.

Explanation:

4 0
3 years ago
Write a C++ line of code to declare a variable of type “double” that signifies the average of student grades, then initialize th
mamaluj [8]

The line of code required to assign a value of 50.00 to a variable of double data type in C++ can be written thus :

  • double average_student_grade = 50.00;

The declaration follows the format :

  • Data type
  • Variable name
  • Value

The data type which is first stated, the double data type are floating point (have decimals) numbers which have 64 bit precison(a precison of 15 decimal digits) as opposed to floats which have 32 bit precison (a precison of 7 decimal digits).

The variable name is the name to hold the value of average grade. This name depends on the preference of the programmer. However. It is advisable that variable names are relatable.

Therefore, variable declaration in C++ may follow the format data type then variable name then value.

Learn more :brainly.com/question/12908743

4 0
1 year ago
The viewer of an OLAP report can change its format. Which term implies this capability?
amm1812

Answer:

The answer is "Option D".

Explanation:

OLAP reports stands for Online Analytical Processing reports, These reports provide a platform that behind many application use in Business Intelligence. and other options are incorrect that can be described as follows:

  • In option A, It is used to store the data into the OLAP report, that's why it is not correct.
  • In option B, It is software that is used for analytics data, that's why it is not correct.
  • In option C, It is used for finding index values in the 2D array that's why it is not correct.
3 0
3 years ago
Read 2 more answers
Sixteen stations, numbered 1 through 16, are contending for the use of a shared channel by using the adaptive tree walk protocol
Ksivusya [100]

Answer:

11 bit slot will be needed

Explanation:

The number of prime numbers between 1 through 16

= 2, 3 , 5, 7, 11 and 13

hence we can say 6 stations are to use the shared channel

Given that all the stations are ready simultaneously

The number of bit slots that will be needed to handle the contention will be 11 bits :

slot 1 : 2, 3, 5 , 7, 11 , 13

slot 2 : 2,3, 5, 7

slot 3 : 2, 3

slot 4 : 2 .   slot 5 : 3 .  slot 6 : 5,7.   slot 7 : 5 .   slot 8 : 7.  slot 9: 11,13.  

slot 10 : 11.   slot 11 : 13

8 0
3 years ago
Other questions:
  • Encryption relies on the use of _________to ensure that information is readable only by the intended recipient.
    5·1 answer
  • Define the method object inc_num_kids() for personinfo. inc_num_kids increments the member data num_kids. sample output for the
    11·1 answer
  • To arrange data in alphabetical order quickly, you can _____ the data.
    7·2 answers
  • .When an argument is passed ______________, the called method can access and modify the caller’s original data directly.
    8·1 answer
  • during zach's second visit of the year, he incurred a $450 bill. Describe how much is paid by Zach and the insurance carrier
    7·1 answer
  • Your IT manager wants you to set up three computers to appear to users as one powerful Windows Server 2016 server. What capabili
    14·1 answer
  • How do you get a crown on this website<br> look under your points on the right side of your picture
    15·2 answers
  • Define global variables called highestNum, userInput and sumOfNums and initialize them. In Main call 2 methods: 1) UserData() 2)
    5·1 answer
  • How many passes will it take to find 30 using a binary search?
    6·1 answer
  • write a function that given an integer n returns the smallest integer greater than n the sume of whose digits is twice as big th
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!