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
anzhelika [568]
3 years ago
12

Suppose you are purchasing something online on the Internet. At the website, you get a 10% discount if you are a member. Additio

nally, you are also getting a discount of 5% on the item because its Father's Day. Write a function that takes as input the cost of the item that you are purchasing and a Boolean variable indicating whether you are a member (or not), applies the discounts appropriately, and returns the final discounted value of the item. Note: The cost of the item need not be an integer
Computers and Technology
1 answer:
patriot [66]3 years ago
6 0

Answer:

<em>The function is written in C++</em>

void calc_discount(double amount,bool member)

{

 double discount;

 if(member)

 {

  discount = amount - 0.10 * amount - 0.05 * amount;

 }

 else

 {

  discount = amount - 0.05 * amount;

 }

 cout<<"Discount = "<<discount;

}

Explanation:

<em>I've included the full source code (including the main method) as an attachment where I use comments as explanations</em>

Download cpp
You might be interested in
Taking notes on a customer complaint is a form of a communication<br> TRUE OR FLASE
almond37 [142]
True because you are seeing the tone and listening to the reasons why they are making the complaint. and your communication to the customer.
3 0
3 years ago
An attacker attempting to break into a facility pulls the fire alarm to distract the security guard manning an entry point. Whic
OlgaM077 [116]

Answer:

'Urgency' is the name of this type of social engineering attack.

Explanation:

Social engineering attack describes a broad range of malicious activities accomplished through human interactions. It uses psychological manipulation to trick users into making security mistakes or giving away sensitive information.

In 'Urgency attacks', the attacker uses some sort of emergency or urgent situation to get someone/people to do what they want or divulge a piece of information.

Hope this Helps!

5 0
4 years ago
if i were to buy one of these and plug it into a ps4 usb slot would i be able to see it on a tv? cause my hdmi slot on the ps4 i
alisha [4.7K]
It should work unless you did or bought the wrong thing
7 0
3 years ago
Read 2 more answers
It is safe to tell an online acquaintance (someone you have never met in person) your
Anna [14]
It is safe to give out information that the other user can't use to track you. Generally, these include favorite music, favorite bans, hobbies.

It is never safe to give our personal and identifying information about yourself. This includes your full name (in most cases), place of residence, or any other contact information you may have - such as social media information.

D. Favorite music
7 0
3 years ago
Read 2 more answers
Write the definition of a function, is_reverse, whose two parameters are arrays of integers of equal size. The function returns
Alisiya [41]

Answer:

def is_reverse(lst1, lst2):

   lst2 = lst2[::-1]

   if lst1 == lst2:

       return True

   else:

       return False

Explanation:

Create a function called is_reverse that takes two parameters, lst1 and lst2

Reverse the second list using slicing

Check if the first list and the second list are equal to each other. If they are, return True. Otherwise, return False

4 0
3 years ago
Other questions:
  • A friend of yours is having trouble getting good Internet service. He says his house is too remote for cable TV—he doesn’t even
    11·1 answer
  • A smartphone user entered an incorrect passcode on his phone several times in a row, which locked the device.
    5·1 answer
  • Answer ASAP and I'll give brainliest.
    10·2 answers
  • You have just starting working at Quantum Company. As a new programmer, you have been asked to review and correct various pseudo
    14·1 answer
  • You are in charge of an event at work. You want to plan and schedule events and resourse. What type of software should you use?
    14·2 answers
  • Consider the following class declaration.
    6·1 answer
  • Write a line of code to convert time to hours. Remember there are 60 minutes in an hour. Then write a line of code to calculate
    9·2 answers
  • How many miss Dragon Ball Abridged?
    5·2 answers
  • 1
    5·2 answers
  • I NEED INFORMATION ON THE WALT DISNEY VS. FADEN CASE ASAP<br> WILL GIVE BRAINLIEST
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!