Thank you
Expand|Select|Wrap|Line Numbers
- /*Tax calculator for Kudler Fine Foods*/
- /*This program is designed to calculate the tax on the taxable dollar amount of each purchase at each Kudler Fine Foods store*/
- #include<stdio.h>
- int main (void)
- {
- int tax_input;
- tax_input=tax_calculator();
- printf ("%.2f\n", tax_input);
- return 0;
- }
- float tax_calculator (void)
- {
- float iOperand1;
- printf ("\nKudler Fine Foods tax calculator\n");
- printf ("\nEnter the amount of the total purchase that is taxable at the Del Mar location: ");
- getchar();
- scanf ("%.2lf", &iOperand1);
- getchar();
- printf ("The tax on the purchase at the Del Mar location is %.2f\n", iOperand1*.0725);
- getchar();
- printf ("\nEnter the amount of the total purchase that is taxable at the Encinitas location: ");
- getchar();
- scanf ("%.2lf", &iOperand1);
- getchar();
- printf ("The tax on the purchase at the Encinitas location is %2.f\n", iOperand1*.075);
- getchar();
- printf ("\nEnter the amount of the total purchase that is taxable at the La Jolla location: ");
- getchar();
- scanf ("%.2lf", &iOperand1);
- getchar();
- printf ("The tax on the purchase at the La Jolla location is %.2f\n",
- iOperand1*.0775);
- iOperand1=getch();
- return iOperand1;
- }