#include <stdio.h>
float tax = .15;
int price;
int main(void)
{
printf("What is the Cost?");
scanf("%d", &price);
#define total price*tax+price
printf("\nTotal cost= %ld\n",total);
system("pause");
return 0;
}
What it does is it asks for the cost of something, then gives you the cost after adding tax to it. But something is wrong with my variable "tax". Can anyone help please?