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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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