Checkout
checkout
view
Your Cart Your Cart: item(s)
Add to Shopping Cart
$2.19 Instant Download
Computer Science, Data Structures and Algorithms
Other

Design a flow chart looping the program code


//student name
#include     
main ()                   
{
//declare variables
float fStore1=.0725;   //use floats due to possibility of using decimals
float fStore2=.075;    //here is where taxes are hard coded in the program
float fStore3=.0775;
int iStore=0;
float fPurchase=0.0;
float fTax=0.0;  
float fTotal=0.0;  

printf("student name,C Programming Service Request, February26,2007n");  
printf("n1. Del Mar-7.25n");
printf("n2. Encinitas-7.5n");
printf("n3. LaJolla-7.75n");
printf("nEnter store number:  ");
scanf("%d", &iStore);   //store the store number entered to use later
switch (iStore)
  {
   case 1:   //if store selected is number 1 then do all tasks below
      printf("nEnter amount from sale:");
      scanf("%f", &fPurchase);  //store sale amount
      fTax=fPurchase* fStore1;  //declare value for tax-purchase times 7.25% tax
      printf("nThe taxes are: $%.2fn",fTax);
      fTotal=fTax + fPurchase;  //calculation of total for Del Mar
      printf("nThe total is : $%.2fn", fTotal);  
      break;
    case 2: //if store selected is number 2 then do all tasks below
      printf("nEnter amount from sale:");
      scanf("%f", &fPurchase);
      fTax=fPurchase * fStore2;  //declare value for tax-purchase times 7.5% tax
      printf("nThe taxes are: $%.2fn",fTax);
      fTotal=fTax + fPurchase;   //calculation of total for Encinitas
      printf("nThe total is : $%.2fn", fTotal);  
       break;
    case 3: //if store selected is number 3 then do all tasks below
      printf("nEnter amount from sale:");
      scanf("%f", &fPurchase);
      fTax=fPurchase * fStore3;  //declare value for tax-purchase times 7.75% tax
      printf("nThe taxes are: $%.2fn",fTax);
      fTotal=fTax + fPurchase;   //calculation of total for LaJolla
      printf("nThe total is : $%.2fn", fTotal);  
      break;
  }    //end case statements
}     //end program

Attachments
Service Request 4.c  View File

By OTA:  Suraj Joshi, PhD (IP)

OTA Rating:  4.7/5

Your Price:  $2.19  (original value ~$11.97)

What's included:

  • Plain text response
  • Attachment(s):
    • 117852.doc
$2.19 Download Add to Cart

Add to Shopping Cart
$2.19 Instant Download
Miracle C program Calculator + Flow Chart - 1. What is the input of the problem? (Purchase Total of $125.00 for each store) • Del Mar - 7.25% • Encinitas - 7.5% • La Jolla - 7.75% _____________________________________________________________________ 2. What is the output of the problem? The sales tax amount for each store of the 125.00 Purchase for each. _____________________________...
Changes needed to .c code #1 & #2 - I need two separate codes for each request. Thanks. #include /*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....
Needed Arrays - I need to have a couple of arrays for the tax amounts. Can someone add them in? ******************************************************************** 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 wh...
Create the keys and relationships between tables for the Huffman Trucking Driver Log - Using Microsoft Access, create the keys and relationships between tables for the Huffman Trucking Driver Log.
Global Logistics - What are the challenges posed by global logistics? How can an organization meet these challenges?

Page generated in 0.0153 seconds

About Us ·  Contact Us ·  Samples ·  Solutions ·  Legal Terms and Conditions ·  Privacy Policy

©2008 SolutionLibrary.com

Search for Solutions About Us Samples