Modify the c program so that user inputs the purchase amount

Assignment Help C/C++ Programming
Reference no: EM13948129

#include <stdio.h>

/*Using define macros for assigning tax to different stores */
#define DelMar 7.25
#define Encinitas 7.5
#define LaJolla 7.75

/*
Input:
? Del Mar - 7.25%
? Encinitas - 7.5%
? La Jolla - 7.75%

Output:
The sales tax amount for each store of the 125.00 Purchase for each.
*/
int main(){
// The total sales for each store is
float sales = 125.00;
//Display Program Header
printf("Tax Calculator for Kudler Fine Foods for All locationsnnn");

//Calculate and print the Tax for Del Mar
printf("The Sales Tax for Del Mar Store is $ %.2fnn", sales * DelMar/100);
//Calculate and print the Tax for Encinitas
printf("The Sales Tax for Encinitas Store is $ %.2fnn", sales * Encinitas/100);
//Calculate and print the Tax for La Jolla
printf("The Sales Tax for La Jolla Store is $ %.2fn", sales * LaJolla/100);

getch();

return 0;

}
**************************************************************************
Service Request: SR-kf-008

Change Request: 1

Requestor: Harvey Stephens

Modify the C program so that the user inputs the purchase amount. Check the user's input for validity. In addition to calculating the sales tax for each location, calculate and display the total sale amount for each location.

********************************************************************
Service Request: SR-kf-008

Change Request: 2

Requestor: Harvey Stephens

Modify the C program so that the user inputs the purchase amount.

Check the user's input for validity. Have the user select from a menu which store to use for the tax calculation.

Calculate and display the tax amount for the store selected and the total sale amount for that store.

Reference no: EM13948129

Questions Cloud

The review class in the same package : A, are the check class and the review class in the same package B, what is the name of file 1? C,what is the name of file 2?
Calculate the target cost for expanding the market share : Calculate the target cost for expanding the market share by 20 percent, assuming that the per-unit profitability is maintained as requested by the CEO.
Explain what a sequential access file is. : What are the advantages and disadvantages of using sequential access data files?
Critically evaluate these comments : Critically evaluate these comments. Please do not wander; concentrate on the issues described in the quotation.
Modify the c program so that user inputs the purchase amount : Modify the C program so that the user inputs the purchase amount. Check the user's input for validity. In addition to calculating the sales tax for each location, calculate and display the total sale amount for each location.
What errors prevent the table displayed : What errors prevent the table displayed above from being first normal form compliant?Bring the table(s) into first normal form compliance without loss of any data. Identify primary and foreign keys (when present) for all tables.
Maximum total deflection : A helical spring is to be constructed from a 4340 steel. The design calls for 5 coils, a coil-to-coil diameter of 12 mm, and a wire diameter  of  3  mm. Furthermore, a  maximum total deflection of 5.0 mm is possible without any plastic deformation..
Square cross section of edge length : A bar specimen having a square cross section of edge length c is subjected to a uniaxial tensile force F, as shown in the fol- lowing figure. Derive strength and stiffness performance index expressions analogous to Equations 22.9 and 22.11 for thi..
Children from the area who attend the school : So there are no minority children from the area who attend the school. Can the school qualify for tax exempt status under Section 501 (c) (3)? Why or why not?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  What are four examples of how direction can be used

What are four examples of how "direction" can be used in an effective publication?

  What constructors do and when they are executed

Explain what constructors do and when they are executed. Explain the two types of constructors. Provide an example class that includes both types of constructor functions and demonstrate how an object would be instantiated using both types of constru..

  Extension of a filename

Modify your earlier program that found the extension of a filename. This time your program will identify a file name that is no longer that 12 characters and has one of five extensions that you specify (eg: .doc. .py, .html, .txt, .ps).

  Questions of c programming

Write a program in C++ to ask the user to input a set of characters, one at a time separated by the carriage return (Enter). Each character, as well as, its corresponding ASCII value should be stored in a linked list node.

  Modify the payroll program

Modify the Payroll Program so that it uses a class to store and retrieve the employee's name, the hourly rate, and the number of hours worked.

  Features with the real life scenarios

Explain any three features that must be implemented by the application that will be created by WebSoft Solutions Pvt. Ltd. Support your answer with suitable examples. Relate the features with the real life scenarios.

  Write a function for upper triangular matrix

Write a function 'function x = u solve(A,b)' to solve Ax = b when 'A' is a upper triangular matrix.

  Use the lengthof the side as a member variable of the class

write a class including four member functions to compute the areas of an equilateral triangle ,square,hexagon and octagon respectively .Use the lengthof the side as a member variable of the class.

  Write a program that will insert random integers

The value will be the random number. Use an iterator to print the two fields lined up on the right with field widths in two columns with the numbers labeled with centered column headings of Key and Value. Since the list is easier to work with, let..

  Program that generates 50,000 random integers from 1 to 6

Program that generates 50,000 random integers from 1 to 6 (inclusive). Count the number of times that each number occurs and output the totals

  What does the return statement do

What is the purpose of the function header?How may you identify the body of a function?  What does the return statement do?

  Define a class for a type called fraction

Define a class for a type called Fraction. This class is used to represent a ratio of two integers. Include mutator functions that allow the user to set the numerator and the denominator.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd