here is the pseudo code:
Write “Enter the price in dollars:”
Input Price
Write “Enter state sales tax(e.g. .06) :”
Input SalesTax
Set Price = Price + (Price * SalesTax)
Write “Price with Tax is” + Price
This is my attempt.
#include <stdio.h>
int main(void) {
///* Prompt user for price /
printf(“Enter price in dollars: \n”);
// Input the price
scanf("%f", &price);
/ Prompt user for sales tax */
printf(“Enter state sales tax(e.g. .06) : \n”);
// Input the sales tax
scanf("%f", &sales tax);
// Calculate the price
Set price = price + (price * sales tax);
// Print the result
printf(“Price with Tax is” + price);
return 0;
}
Where have I gone wrong?