M
matt
I am trying to write a basic app to take a price and calculate the
sales tax and print the total. Here is the code I have.
#include <stdio.h>
#define STAX .0825
main(){
int price;
printf("What is the price?\n");
scanf("%d", price);
price += STAX;
printf("The sales tax is: %f\n", (float)price);
}
When I run it, it prompts for a price but says "Bus Error". I think it
may be the STAX but am new to c programming.
sales tax and print the total. Here is the code I have.
#include <stdio.h>
#define STAX .0825
main(){
int price;
printf("What is the price?\n");
scanf("%d", price);
price += STAX;
printf("The sales tax is: %f\n", (float)price);
}
When I run it, it prompts for a price but says "Bus Error". I think it
may be the STAX but am new to c programming.