Question
December 1, 2007 at 08:51 AM
rcook95

Simple C Program

by rcook95 . Updated 18 years, 9 months ago

Modify the C program so that the user inputs the purchase amount. Calculate and display the tax amount for the stores selected and the total sale amount for that store.

/*Rochelle Cook

#include

main()
{
float delmar;
float encinitas;
float lajolla;

float resultdelmar;
float resultencinitas;
float resultlajolla;

delmar=7.25;
encinitas=7.5;
lajolla=7.75;

resultdelmar=125*delmar;
resultencinitas=125*encinitas;
resultlajolla=125*lajolla;

printf(“delmar sales tax cost is $%.2f\n”,resultdelmar);
printf(“encinitas cost is $%.2f\n”,resultencinitas);
printf(“lajolla cost is $%.2f\n”,resultlajolla);
getch();

This discussion is locked

All Comments