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]
3 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]3 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
Analyze the given word pattern and choose the correct option.
frozen [14]

Answer:

The code for DOOR would be <u>3775</u>.

Explanation:

WORD - 9753

W - 9

O - 7

R - 5

D - 3

DOOR: 3775

5 0
2 years ago
Please help!!!
skad [1K]

Answer:

B

Explanation:

Problem and Solution

7 0
3 years ago
Read 2 more answers
When public relations professionals make provocative statements in newsgroups to get people to visit an organization's website o
goldfiish [28.3K]

Answer:

Pitching

Explanation:

According to my research on the different marketing stunts that organizations have done, I can say that based on the information provided within the question this type of Public Relations move is called Pitching. Like mentioned in the question they basically make a controversial statement in front of platforms with huge audiences in order to rile people up so they go visit their site or are aware of their project, which in term leads to sales.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

6 0
3 years ago
Implement the function:
Sloan [31]

Answer:

This is written in C++

Check comments for explanations

Program starts here

#include<iostream>

#include<string>

using namespace std;

//The function get_ap_terms begins here

string get_ap_terms(int a, int d, int size_tn)

{  

// This line initializes the expected string to empty string

string result = "";

//The for iteration loops through the number of terms the function is expected to return

for(int i = 1; i<= size_tn;i++)

{

//This line checks if the loop is less than the number of  terms    

if(i < size_tn)

  {

//This string gets the current term of the progression

   result+=to_string(a)+ ", ";

//This line calculates the next term

   a+=d;  

  }

  else

  {

//This line calculates the last term

   result+=to_string(a);

  }

}

//This line returns the string containing the first n terms of the arithmetic progression

return result;

}

//The main function starts here

int main()

{

//This line declares the first term (a), the common difference (d) and the number of terms (size_tn)

int a,d,size_tn;

//This line prompts the user for the first term

cout<<"First Term: ";

//This line gets the first term

cin>>a;

//This line prompts the user for the common difference

cout<<"Common Difference: ";

//This line gets the common difference

cin>>d;

//This line prompts the user for number of terms

cout<<"Number of Terms: ";

//This line gets the number of terms

cin>>size_tn;

//This line calls the function to print the string containing the first n terms

cout<<get_ap_terms(a, d, size_tn);

return 0;

}

//Program ends here

3 0
4 years ago
Which measure should you take for the periodic maintenance of your computer?
WITCHER [35]
I believe the answer is annual maintenance
Hope this helps :p
6 0
4 years ago
Read 2 more answers
Other questions:
  • You are replacing the toner cartridge for an old laser printer. You are concerned that several internal components are reaching
    8·1 answer
  • Given an integer variable bridgeplayers, write an statement that increases the value of that variable by 4.
    9·1 answer
  • Estimate how many searches will be needed to justify time spent on presorting an array of 101 elements if sorting is done by mer
    12·1 answer
  • Your colleagues are discussing the operation of a device in which packets are routed between VLANs on the device rather than hav
    7·1 answer
  • Why is Internet fraud becoming increasingly common?
    5·1 answer
  • Write a program that reads the data from rawdata_2004.txt into a dictionary whose keys are country names and whose values are pe
    5·1 answer
  • Each type of text has a purpose for the reader if you were looking to research penguins what type of text would u utilize
    11·1 answer
  • I need this answer right away!
    13·1 answer
  • Which clue can be used to identify a chemical reaction as a combustion reaction?
    9·1 answer
  • The. Model has the disadvantage of high project cost due to creation several prototypes
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!