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

  Searching f and removing certain states from the hash table

use the class hashT, ''Hashing: Implementation Using Quadratic Probing,'' which uses quadratic probing to resolve collision, to create a hash table to keep track of each state's information. Use the state's name as the key to determine the hash addre..

  Design and implement a library system

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality.

  Contrast symmetric and asymmetric cryptography

"Cryptography is ‘generally' considered to be the broadest security technique available." Explain what this statement means with respect to the principles of information security.

  Modify the class by adding a private int pointer

Modify the class by adding a private int pointer that will be used as an array. Create another overloaded constructor that takes an int pointer and int size as parameters.

  Implement a function which computes the minimum cost

Use the min function to determine with a resolution of 0.01 ft the values of Rand L required minimizing the total cost of the fence. Also compute the minimum cost.

  Design a modular program that asks the user

A retail company must file a monthly sales tax report listing the total sales for the month, and the amount of state and county sales tax collected. The state sales tax rate is 4 percent and the county sales tax rate is 2 percent. Design a modular..

  Program reads a number and prints all of its binary digit

Write a program that reads a number and prints all of its binary digits. Print the remainder number % 2, thenreplace the number with number / 2. Keep going until the number is 0.

  Write a program that inputs two characters

Write a program that inputs two characters from the keyboard and passes them to function packCharacters.

  Execute the next line which is enter your last name

C++ in VS and I'm trying to run the following program. As soon as I put in my name after the 2nd cout statement, the program ends.

  Relationship between obesity and food consumption

Researcher states that there is relationship between obesity and food consumption. Obesity is the condition of excess body fat and it can get diabetes, heart disease, high blood pressure and also fatal. People in the US getting obese because of the l..

  Declare two character arrays

Write a C program for Code warrior, to declare two character arrays called list1 and list2. Initialize list1 with your first and last name. Write the main code to copy list1 to list2.

  Write a program that inputs a line of text into char

8.6 (Displaying Strings in Uppercase and Lowercase) Write a program that inputs a line of text into char array s[100]. Output the line in uppercase letters and in lowercase letters.

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