Hi,
I've managed to write the following program that displays total purchase price amounts for places with different sales tax rates. As it is, it assumes a value of $125, but I need to now modify it so a user can input any item price. I'm banging my head against a wall with this one.
Thanks for any help!
Code:
#include <stdio.h>
main()
{
char city1[] = "Lajolla";
char city2[] = "Encintas";
char city3[] = "Delmar";
float tax1;
float tax2;
float tax3;
int pur1;
tax1 =7.75;
tax2 =7.5;
tax3 =7.25;
pur1 =125;
printf("\nItem price is %d\n", pur1);
getch();
printf("Tax at %s is: $%.2f\n", city1,pur1 * (tax1 / 100) );
printf("Tax at %s is: $%.2f\n", city2,pur1 * (tax2 / 100) );
printf("Tax at %s is: $%.2f\n", city3,pur1 * (tax3 / 100) );
getch();
}