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
igomit [66]
3 years ago
12

Write a C function (NOT A COMPLETE PROGRAM)which takes three parameters which are the cost for an item in a grocery store, the q

uantity to buy, and the tax percentage. The function should calculate and returnthe following values:i. The cost before the tax amount(cost* quantity)ii. The taxamount (the cost before the tax amount* tax% / 100)iii. The cost with the tax amount(the cost before the tax amount the tax amount) for the item.
Computers and Technology
1 answer:
Vinvika [58]3 years ago
5 0

Answer:

Check the explanation

Explanation:

#include <stdio.h>

void CalculateTotal(float cost,int quantity,int tax){

  float costbeforetax=cost*quantity;

  printf("\nTotal Cost Before Tax %f is ",costbeforetax);

  float taxamount=(costbeforetax*tax)/100;

  printf("\n Tax amount %f is ",taxamount);

  float total=costbeforetax+taxamount;

  printf("\n Total amount after Adding Tax %f is ",total);

}

int main()

{

  float cost;

  int quantity,tax;

  printf("Enter Cost of Item ::");

  scanf("%f",&cost);

  printf("Enter Quantity of Item ::");

  scanf("%d",&quantity);

  printf("Enter Tax in % ::");

  scanf("%d",&tax);

  CalculateTotal(cost,quantity,tax);

  return 0;

}

/*

The Output will look like this:

Enter Cost of Item ::10

Enter Quantity of Item ::5

Enter Tax in % ::23

Total Cost Before Tax 50.000000 is

Tax amount 11.500000 is

Total amount after Adding Tax 61.500000 is

*/

You might be interested in
PI
siniylev [52]

Explanation:

As the qn was copy pasted from another document...the qn seems incorrect... and incomplete..

pls see to it and attach the correct qn...

sorry

4 0
3 years ago
Create a cell reference in a format by typing in the cell name or
Neko [114]

Answer:

D. Create a cell reference in a formula by typing in the cell name or clicking the cell.

Further Explanation:

To create a cell reference in a formula the following procedure is used:

First, click on the cell where you want to add formula.

After that, in the formula bar assign the equal (=) sign.

Now, you have two options to reference one or more cells. Select a cell or range of cells that you want to reference. You can color code the cell references and borders to make it easier to work with it. Here, you can expand the cell selection or corner of the border.

Again, now define the name by typing in the cell and press F3 key to select the paste name box.

Finally, create a reference in any formula by pressing Ctrl+Shift+Enter.

6 0
3 years ago
A(n) _____ is a flexible tool used to analyze data using reports that do not have a predetermined format.
Mandarinka [93]

Answer:

decision support system

Explanation:

4 0
3 years ago
Can anyone find any words in here?
kogti [31]

Answer:

Pit, all, heck, ton, act

Explanation:

3 0
4 years ago
Read 2 more answers
A derived class has access to __________.
Kitty [74]

Answer:

Option a is the correct answer for the above question

Explanation:

The derived class is a class that inherits the property of the base class, and he can access the public variable and function or members of the base class or ancestor class.

Option 'a' also states the same and the question asked about the assessment of the derived class. Hence option a is the correct answer while the other is not because:-

  • Option b states about the private members, but it is not accessible by the derived class.
  • Option c states about the derived class members but it can also access the base class members.
  • Option d none of the above, but option a is the correct answer.

5 0
4 years ago
Other questions:
  • ________ to a base class may be assigned the address of a derived class object.
    8·2 answers
  • Identify which statement explains why a programmer would break a logic problem into steps.
    13·2 answers
  • To maintain her audience's confidence in her, what should kiara not do while delivering her presentation?
    10·1 answer
  • Why is network security important? Check all of the boxes that apply. A. Network security allows organizations to continue to fu
    8·1 answer
  • Summarise all what you know about spss​
    15·1 answer
  • How many miss Dragon Ball Abridged?
    5·2 answers
  • Jason has decided to use his name on all the images to protect them from misuse. He has also decided to use the logo of his comp
    15·2 answers
  • 5. Describe the concept behind a digital signature and explain how it relates to cybersecurity by providing a hypothetical examp
    6·1 answer
  • Activity 8. Direction: Read the article and make an outline. Be guided by the rubric for outlining. Write your answer on a separ
    15·1 answer
  • Write a recursive function called DigitCount() that takes a positive integer as a parameter and returns the number of digits in
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!