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

  Write a program that will store 10 integers into an array

Write a program that will store 10 integers into an array. Only accept integers between -100 and 100. Display those integers. You must then square those integers by CALLING A FUNCTION to square each individual integer. That function must be called, s..

  Create an array of boat objects

Create Classes for each of the object types that need to be stored, as indicated above.

  Program that computes and prints the 1000th prime number

You will need some variables to keep track of which prime number you're on and keep track of where you are in your loop.

  Write a program that reads letters from a file

This program should open an inputLet.txt file , read in one character at a time and repeat this for the number of games the user wants to play.

  Write a java class named mylinkedlist and implement it

void updateList(MyLinkedList otherlist) that will update the current list with a given otherlist. If an element in current list exists in the otherlist then replace (update) it, otherwise insert (add) it using the above insertSortNoDuplicate metho..

  Define the sums of every even column of 2d array

Define the sums of every even column of 2D array in C language - Prepare this program in c language. Show all your work.

  Recursive function could result in an infinite loop

Briefly explain how the following recursive function could result in an infinite loop and what you could do to correct this:

  Compute the stress and strain in a steel rod of diameter d

Write a MAIN function and the following funcations to compute the stress and strain in a steel rod of diameter D (inches) and length L (inches) subject to the compress loads P of 10,000 to 1,000,000 pounds in increments of 100,000 pounds.

  Describe what kind of architecture the new payroll

you have been tasked with building a payroll program for a large organization with offices spread across the united

  Omaha foods manufacturescorn meal in a continuous

Omaha Foods manufacturescorn meal in a continuous, mass production process. Corn is added at the beginningof the process. Normal losses are minimal and abnormal losses infrequentlyoccur when foreign materials are found in the corn meal. Routine inspe..

  Program to produce ten random permutations of numbers

In C++(must be able to compile in Visual Studio ): Write a program to produce ten random permutations of numbers 1 to 10.

  String converter

String Converter: Implement a program that asks the user to input up to 20 strings (stopping when the user inputs 0). Store these strings in a 2-dimensional array. Replace all the characters that are upper-cased to their lower-case equivalent.

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