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
IRINA_888 [86]
3 years ago
9

An application needs to calculate sales tax for purchases. You decide to simplify the code by putting the sales tax calculation

in a function. The returned value from the function is then added to the Subtotal, and the result is stored in the decTotal variable. Which of the following statements will call the GetSalesTax function and return a value to be used in the Total calculation?a.) decTotal = decSubtotal + GetSalesTax()b.) decSubtotal + GetSalesTax(decSubtotal)c.) decTotal = decSubtotal + GetSalesTax(decSubtotal)d.) decTotal = decSubtotal + GetSalesTax(decSubtotal As Decimal)
Computers and Technology
1 answer:
vodka [1.7K]3 years ago
4 0

Answer:

Option C: decTotal = decSubtotal + GetSalesTax(decSubtotal)

Explanation:

To get sales tax, we need a function can process a subtotal amount and return the tax values. By presuming<em> GetSalesTax()</em> is a function that will return a tax value, this function will expect decSubtotal as the input parameter to the function. Otherwise, there will be no values processed in the function.

The statement  <em>decTotal = decSubtotal + GetSalesTax(decSubtotal)  </em>will invoke function<em> GetSalesTax()</em> by passing<em> decSubtotal </em>as argument. Next the return value of the function will be added with decSubtotal and the summation amount assigned to the variable <em>decTotal</em>.

You might be interested in
Select the most likely outcome of making only on-time minimum payments to a credit
Serjik [45]
The answer is B. Your will have gone mostly towards paying interest and you will still owe the majority of the balance that you had from ago
4 0
3 years ago
How many times is the body of the loop executed?
Flura [38]

Answer:

The loop will run 5 times.

3 0
2 years ago
Create a function generateString(char, val) that returns a string with val number of char characters concatenated together. For
WARRIOR [948]

I have write a very simple code for you in python and i hope it will help you a lot.


def generateString(char, val):

   print(char * val)

Explanation:

This is how you can create your function in python and this function will give you the desired output.


How to Call a function:

generateString('a',12)

this is how you can call the function to get output.

I hope you get the idea.



5 0
3 years ago
Read 2 more answers
You write a short story, but you want to make sure your work is protected before you post it online. What should you do to help
Mars2501 [29]
Make sure you but no copyright, author, and date of publication, that may help.
8 0
3 years ago
How do we add questions on sam Blockly?​
Blizzard [7]

Answer:

I do not know that answer

5 0
3 years ago
Other questions:
  • When reading a ____ language, we use our understanding of the richness of the language's vocabulary to extract the meaning. geop
    10·1 answer
  • What is the difference between the web and the internet?
    14·1 answer
  • What was your learning target for today
    9·2 answers
  • Johnathan was assigned to complete a project with three other people. What benefit will he get from working with the team?
    15·1 answer
  • HELP TIMED!!!!!!!!!!!!!!!!!!!!
    5·2 answers
  • Will give 5 star and the mark brainleist
    11·2 answers
  • Select the correct answer
    15·1 answer
  • Describe four traditional tehniques for collecting information during analysis.
    11·1 answer
  • Accessibility is the degree to which a product or service is readily available and usable by _____.
    15·1 answer
  • Please can someone solve this question<br>What is a software and types of software​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!