Suppose you are purchasing something online on the Internet. At the website, you get a 10% discount if you are a member. Additionally, 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

Answers

Answer 1

Answer:

The function is written in C++

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:

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


Related Questions

how do you write 4 copies of 3 tenths in standard form

Answers

Answer:

four copies of three tenths

Explanation

just like you did it but its all in words

four copies of three tenths

just right it out

What is a class in CSS?
A.a grouping of HTML tags for which style properties can be declared
B.a selector used to define a unique style
C.a tag used to apply styles to a block of content
D.the part of a declaration describing the type of style to be applied

Answers

I think is B not positively sure tho

Answer:

A grouping of HTML tags for which style properties can be declared

Explanation:

CORRECT

What if rulers appear on my screen?

Answers

Answer:

you can measure it,on word

What order means that the highest numbers will be on top of the column

Answers

Answer:

Descending

Explanation:

I have to drag it to the correct definition plz help!

Answers

Answer:

Copyright - 1

Derivative works - 4

Intellectual property - 3

Fair use - 2

Explanation:

If the VLOOKUP function is used to find an approximate match, what will it return if there is no exact match?
the largest value in the table
the smallest value in the table
O the largest value that is less than the lookup value
the smallest value that is greater than the lookup value

Answers

Answer:

Its C

Explanation:

The largest value that is less then the lookup value

If the machine executes 5000 instructions every microsecond (millionth of a second), how many instructions does the machine execute during the time between the typing of two consecutive characters?

Answers

Answer:

5*10^9 instructions

Explanation:

Let's apply logic to solve this particular problem.

If 5000 instructions get executed in a millionth of a second, then this means that

5000 instructions gets executed every 1*10^-6 second

5000*10^6 instructions get executed every second, or say

5*10^9 instructions get executed after every second.

Going forward, it isn't stated how long it takes to type two consecutive characters, so will assume it's just 1 second(since it's consecutively).

So, succinctly put, if it takes 1 second to type the two characters consecutively, then the machine executed 5*10^9 instructions. And if it takes 2 seconds to type the two characters, then the machine would have executed 10*10^9 instructions

Mrs Jones had p hens then she decided to buy p more hens. how many hens does she have in all?​

Answers

Answer:

2p

Explanation:

if she had p, then she got p again, she got two p amounts. p+p = p*2 = 2p

Lifelong learning ____?
A. stops when your career is over
B. only occurs in a classroom setting
C. begins after you retire
D. can be informal

Answers

B is the right answer

Answer:

can be informal

Explanation:

just took the Unit Test

This Operating System was basically an upgrade to Windows 98 and was designed for home users. 1) Windows ME 2) Windows 2K 3) Windows 2000 4) Windows New Technology

Answers

the answer is windows2k3 hope this helps!

Which questions do you need to ask yourself when preparing for a presentation?​

Answers

Answer:

What do I want to transmit?

Why am I going to present this topic?

What is my believe about this topic?

Who am i going to speak to?

What do I need to work on to convey successfully the topic?(structure, tools, abilities, visual tools)

Explanation:

These are the most important questions, first of all because you have to start with why you are doing the presentation, and what will you do to make the presentation part of your beliefs.

how do i chose the brianliest answer

Answers

Answer:

you can choose the brainliest answer by clicking in a brainliest answer

Answer:

Click on the answer, then click brainliest

Explanation:

Give 2 bennifits of expert system

Answers

Answer:

Provide answers for decisions, processes and tasks that are repetitive.

Hold huge amounts of information.

Minimize employee training costs.

Centralize the decision making process.

Make things more efficient by reducing the time needed to solve problems.

here are a few

hope it helps : )

1. Why Science and Technology is important in nation-building?

Answers

Answer: Technology, science and knowledge are important in modern contemporary society. ... Studies of technology and science provides students with insight into how different processes of knowledge are initiated and progressed, and how innovative technological processes are developed, employed and increase in importance.

Explanation: The role that science and technology has played in improving the life conditions across the globe is vivid, but the benefit has to been harvested maximum by all countries. Science and technology has made life a lot easier and also a lot better with the advancement of medicines and analysis on diseases.

Science and technology play a crucial role in nation-building for several reasons. Firstly, advancements in these fields drive economic growth by fostering innovation, leading to new industries and job opportunities.

Secondly, they improve the overall quality of life through better healthcare, communication, and infrastructure.

Additionally, scientific research and technological developments enhance a nation's global competitiveness and position it as a knowledge-based society.

Moreover, science and technology contribute to addressing societal challenges, such as environmental sustainability and resource management.

Know more about Science and technology:

https://brainly.com/question/1626729

#SPJ5

Planned value:

How is it calculated?

Answers

Take the planned percentage of the completed work and multiply it by the project budget and you will get Planned Value.

Please help!!! best answer will be marked brainlieist, 7 pts!

Which of the following is NOT a required part of a network?


a node

an interconnector

a pointer

packets

Answers

Answer:

i think is packets

Packets
It doesn’t make sense

What was the biggest problem with the earliest version of the internet in the late 1960’s?

Answers

Networks couldn't talk to each other. The TCP/IP protocol could only be used in universities, governments, and businesses.

Answer:

Google didn't exist

Explanation:

Google was born in 1998 so a bunch of things were a problem

Why would a user select More Items for mail merge fields? to manually set an IF-THEN logic for the data field to manually change what merge field data is shown to manually select the format of the name in the greeting line to manually select and place additional fields at an insertion point

Answers

Answer:to manually select and place additional fields at an insertion point

Explanation:

Answer:

D. to manually select and place additional fields at an insertion point

Explanation:

edg. 2020

Bernie is an aspiring video game developer. Learning which of the following software would benefit him the most?

A. Computer-aided design software

B. Sampling software

C. 3-D animation software

D. System software

Answers

Answer:System Software

Explanation:

3-D animation software is for 3d animation

Sampling software is for audio

Computer aided design is an artistic media

A video game developer is is a software developer and is specialized in video game development. It relates to the creation of video games. The video game publisher have maintained a studio. And it involves 3rd party developer.

For making the games he needs 3D animated software such as shade 3D or K-3D. In order to make the game he needs to have all automation software that provides him the visual effects.

Hence the option C is correct.

Learn more about the aspiring video game developer.

brainly.com/question/21539732.

What does binary mean?
Os and 1s
O Decimals
O Digital
O User data

Answers

Answer:

0s and 1s

Explanation:

Answer:

0s and 1s

Explanation: when you talk about binary codes you are talking about the codes made up of 1s and 0s

When collecting digital evidence from a crime scene, often the best strategy for dealing with a computer that is powered on is to:

Answers

Options:

a. remove the hard drive

b. transport it while running

c. perform a clean shutdown

d. unplug it

Answer:

d. unplug it

Explanation:

Indeed, unplugging the computer often the best strategy for dealing with a computer that is powered on so to preserve (or collect) digital evidence. By so doing it allows the investigator to safely check through the computer found at the crime scene.

However, if the investigator decides to remove the hard drive or performing a clean shutdown, valuable evidence may be lost as a result. Also, transporting it while running isn't going to be a viable option.

What is Chris Records LifePreneur Online Educational Training Program?

Answers

Answer:

LifePreneur stands for Lifesyle Entrepreneur. When you take the word lifestyle and entrepreneur to combine them together, you get the brand, LifePreneur. This is the concept behind Chris Record's LifePreneur company.

Lifepreneur is the long-awaited legacy project founded by online serial-entrepreneur Chris Record. Chris currently lives in scorching hot Las Vegas which is fitting because everything online he gets involved in goes big league. Chris has helped tens of thousands of people to start their own online business, and has a true passion for helping everyone succeed.

Lifepreneur is a membership program that you can join to get training in various aspects of online marketing, training and advice and investing, live in-person mentorship from Chris Record himself, and more. It is a membership program that you can sign up for free and it's designed to help you grow into more than just a business entrepreneur… A Lifepreneur.

More info : reddit's /r/LifePreneur

Write a program that calculates and displays the amount ofmoney available in a bank account that initially has $8000 deposited in it and that earns interest atthe rate of 2.5 percent a year. Your program should display the amount available at the end of eachyear for a period of 10 years. Use the relationship that the money available at the end of each yearequals the amount of money in the account at the start of the year plus 0.025 times the amountavailable at the start of the year [20 points].

Answers

Answer:

Written in Python

import math

principal = 8000

rate = 0.025

for i in range(1, 11):

    amount = principal + principal * rate

    principal = amount

    print("Year "+str(i)+": "+str(round(amount,2)))

Explanation:

This line imports math library

import math

This line initializes principal amount to 8000

principal = 8000

This line initializes rate to 0.025

rate = 0.025

The following is an iteration from year 1 to 10

for i in range(1, 11):

    This calculates the amount at the end of the year

    amount = principal + principal * rate

    This calculates the amount at the beginning of the next year

    principal = amount

    This prints the calculated amount

    print("Year "+str(i)+": "+str(round(amount,2)))

Choose the words that make the statement true. You wrote a program called firstProgram.

Your program is _____.

O always running in the background

O stored until you open the file

Answers

Answer:

Stored until you open the file

Explanation:

Your program is stored until you open the file.

-edge 2022

You wrote a program called first Program. Your program is stored until you open the file. The second option is correct.

What is program?

A program is made from code of instructions. A program is saved for later use.

When a program is opened, it is in running condition until it is closed. But when it is not in use, it gets stored at a location for next use.

You wrote a program called first Program. Your program is stored until you open the file.

Thus, the second option is correct.

Learn more about program.

https://brainly.com/question/3224396

#SPJ2

Write a java program that accepts the ingredients for a recipe in cups and converts to ounces

Answers

Answer:

Explanation:

public static int cupsToOunces (int cups) {

   

       int ounces = cups * 8;

       return ounces;

       

   }

This is a very simple Java method that takes in the number of cups in the recipe as a parameter, converts it to ounces, and then returns the number of ounces. It is very simple since 1 cup is equal to 8 ounces, therefore it simply takes the cups and multiplies it by 8 and saves that value in an int variable called ounces.

Which function prompts the user to enter information?

def main()
input()
int()
main()

Answers

Answer:

B. input()

Explanation:

Hope this helps :)

Answer:

Input()

Explanation:

So if you used process of elimination, you can see that def main() defines the start of the program and main() defines the end of the program. Also, int() is to solve without a decimal or special marking, therefore, input() would be the only reliable answer.

~i also got this correct on the test!~

Is a i5 2400 and a GeForce GTX 1060 6GB bottlenecking?

Answers

Answer:

In terms of memory, the GTX 1060 6GB 's 6144 MB RAM is more than enough for modern games and should not cause any bottlenecks. This combination between GTX 1060 6GB and Intel Core i5-2400  3.10GHz has less than 15% bottleneck in many games and can cause minor FPS loss.

Explanation:

i wish i had one of these lol

Answer:

Yes very Much

Explanation:

Please No

Which shortcut key aligns text to the center of a page?
O Ctrl+C
O Ctrl+Shift+C
O Shift+C.
O Ctrl+E

Answers

Option D, Ctrl + E aligns text to centre

it is Ctrl+E it’s the shortcut key that aligns text to the center of a page.

What is a row of data in a database called?

Field,
File,
Record, or
Title

Answers

Answer:

A Field

Explanation:

I got it right

Use the drop-down menus to complete the statements explaining the creation and management of an outline in Word 2016. The Outline view allows a user to add, expand, and collapse content in the document. Headers can be promoted or demoted in the outline by using the directional arrows or . Level 1 headings will appear in the pane.

Answers

Answer:

Heading and subheading

shortcut keys

navigation

Explanation:

i got it wrong and it showed

Answer:

Use the drop-down menus to complete the statements explaining the creation and management of an outline in Word 2016.

The Outline view allows a user to add, expand, and collapse

✔ heading and subheading

content in the document.

Headers can be promoted or demoted in the outline by using the directional arrows or

✔ shortcut keys

.

Level 1 headings will appear in the

✔ Navigation

pane.

Explanation:

Other Questions
en que orden se escribe una referencia bibliografica The capitary action of water is caused the cohesion of water molecules to different types of molecules and the adhesion of water molecules with other water molecules true or false Solve the formula for the surface area of a cone for the height of the cone. pls help me with this True or false??????? Suzanne bought 6 paint sets. Each set contains the same number of brushes. She has 18 brushes. Write and solve an equation to determine the number of paint brushes that came in each paint set. Explain the strategy that you used to solve the equation. HELP ASAP Determine the sequence of rigid motions and dilation that map the preimage abcde to each of its images. An end behavior model for f(x) = 8k = 0A.)8B.)16C.)0D.)4 you are turn as a mayor in your city this 2020 election.what are your political ideologies to give during campaign as your initial introduction for people to rember you?give at least 4 political idiologies.and xplain why. 7. Which word below is an adverb?O accommodatinglyO accommodatorO accommodateO accommodating In the poem The Raven, what technique is used to create a feeling of suspense? OracionesWrite sentences using the information provided. Make any necessary changes. Follow the model.Modelolos estudiantes / preparar / su / ensayosExample answerLos estudiantes preparan sus ensayos.End example answerQuestion 1 with 1 blankGustavo y yo / terminar / nuestro / tareas1 of 1Question 2 with 1 blankt / comprar / tu / calculadora / en / la librera1 of 1Question 3 with 1 blankustedes / hablar / con / su / abuela?1 of 1Question 4 with 1 blankyo / llevar / mi / papeles / a / la clase1 of 1Question 5 with 1 blankAna / estudiar / para (for) / su / exmenes Sales tax is calculated as a percentage of the sales price. If sales tax is 6%, what is the sales tax on clothing that costs $180? $6.00 $9.80 $10.80 $18.60 Write and solve an equation to find the value of x and the missing angle measures Which best describes the authors purpose in Paul Revere's Ride?to prove to readers that Paul Revere deserves more respectto persuade readers that Paul Revere caused the American Revolutionto instruct readers about how to send secret signals like Paul Revereto educate readers about Paul Reveres impact on history Explain how errors in measurements can affect the safety of products? HELPPPPPPPPPP ITS DUEEEEEEEEEEEEEEEE Oct 09, 11:40:51 AMSolve the following inequality for f. Write your answer in simplest form.9f + 5(-8f +1) < 3f +7 10fiSubmit AnswerPrivacy Policy Terms of Serviceattempt out of 2Copyright 2020DIL Which situations contributed to a rise in socialism following World War I? Check all that apply. poor economic conditions optimistic attitudes about the future resentment toward the existing government increased trade with socialist countries rise of popular socialist leaders