Purchase Solution

Tax Calculation Program for Multiple Stores

Not what you're looking for?

Ask Custom Question

I need two separate codes for each request. Thanks.

#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.

Purchase this Solution

Solution Summary

With Input Validation, Total Sales figures in each location, and much more.

Purchase this Solution


Free BrainMass Quizzes
Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Javscript Basics

Quiz on basics of javascript programming language.

Basic Networking Questions

This quiz consists of some basic networking questions.

C# variables and classes

This quiz contains questions about C# classes and variables.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.