Can anyone tell me why this won't compile?
#include <stdio.h>
#include <ctype.h>
void main ()
{
/* Variables defined with corresponding tax rates. */
float fTaxRateDelMar = .0725;
float fTaxRateEncinit as = .075;
float fTaxRateLaJolla = .0775;
/* Variable defined for user inputed dollar amount to be taxed.*/
float fDollarAmount = 0.0;
printf("\nWelco me to Kudler Fine Foods.\n");
printf("\nPleas e enter the subtotal to be taxed: ");
scanf ("%f", &fDollarAmount) ;
/* Check validity of user input (number) - return if input is invalid, continue if input is valid */
int i = isdigit(fDollar Amount);
while i==0
{
printf("\nPleas e enter a valid number: ");
scanf ("%f", &fDollarAmount) ;
int i = isdigit(fDollar Amount);
}
/* Calculation variables defined and calculations accomplished. */
float fSalesTaxDelMar = fDollarAmount * fTaxRateDelMar;
float fSalesTaxEncini tas = fDollarAmount * fTaxRateEncinit as;
float fSalesTaxLaJoll a = fDollarAmount * fTaxRateLaJolla ;
float fTotalSaleDelMa r = fDollarAmount + fSalesTaxDelMar ;
float fTotalSaleEncin itas = fDollarAmount + fSalesTaxEncini tas;
float fTotalSaleLaJol la = fDollarAmount + fSalesTaxLaJoll a;
/* Print statements to display the Sales Tax and Total Sale values. */
printf("\nThe sales tax on $%i at the Del Mar store is: $%.2f\n", fDollarAmount, fSalesTaxDelMar );
printf("\nThe sales tax on $%i at the Encinitas store is: $%.2f\n", fDollarAmount, fSalesTaxEncini tas);
printf("\nThe sales tax on $%i at the La Jolla store is: $%.2f\n", fDollarAmount, fSalesTaxLaJoll a);
}
#include <stdio.h>
#include <ctype.h>
void main ()
{
/* Variables defined with corresponding tax rates. */
float fTaxRateDelMar = .0725;
float fTaxRateEncinit as = .075;
float fTaxRateLaJolla = .0775;
/* Variable defined for user inputed dollar amount to be taxed.*/
float fDollarAmount = 0.0;
printf("\nWelco me to Kudler Fine Foods.\n");
printf("\nPleas e enter the subtotal to be taxed: ");
scanf ("%f", &fDollarAmount) ;
/* Check validity of user input (number) - return if input is invalid, continue if input is valid */
int i = isdigit(fDollar Amount);
while i==0
{
printf("\nPleas e enter a valid number: ");
scanf ("%f", &fDollarAmount) ;
int i = isdigit(fDollar Amount);
}
/* Calculation variables defined and calculations accomplished. */
float fSalesTaxDelMar = fDollarAmount * fTaxRateDelMar;
float fSalesTaxEncini tas = fDollarAmount * fTaxRateEncinit as;
float fSalesTaxLaJoll a = fDollarAmount * fTaxRateLaJolla ;
float fTotalSaleDelMa r = fDollarAmount + fSalesTaxDelMar ;
float fTotalSaleEncin itas = fDollarAmount + fSalesTaxEncini tas;
float fTotalSaleLaJol la = fDollarAmount + fSalesTaxLaJoll a;
/* Print statements to display the Sales Tax and Total Sale values. */
printf("\nThe sales tax on $%i at the Del Mar store is: $%.2f\n", fDollarAmount, fSalesTaxDelMar );
printf("\nThe sales tax on $%i at the Encinitas store is: $%.2f\n", fDollarAmount, fSalesTaxEncini tas);
printf("\nThe sales tax on $%i at the La Jolla store is: $%.2f\n", fDollarAmount, fSalesTaxLaJoll a);
}
Comment