Sorry MosaicFuneral, I do not even know what that means.
If I could I would like to get it working correctly as I have it in my mind and then refine from there. I also have a few ideas in that arena, but first want to execute to see how this works.
I have adjusted my code, I think I am close but it will not compile.
if (storenum >=1 && if storenum <=3) //While Loop to Request Input of 1,2,or 3, still working on this
{
switch (storenum) // simple switch which responds to corresponding menu choice with output
}
{
case 1:
//Calculates and Displays Store, Sales, Tax rate, Tax for Del Mar
printf("\nDel Mar \tSale $%.2f\tRate %.2f%%\tTax $%.2f%\t\n\n",sales, DelMar, sales*DelMar/100); //values are correct so I am leaving it this way. ahead of schedule here.
break;
case 2:
//Calculates and Displays Store, Sales, Tax rate, and Tax for Encinitas
printf("\nEncinitas \tSale $%.2f\tRate %.2f%%\tTax $%.2f%\t\n\n",sales, Encinitas, sales*Encinitas/100);
break;
case 3:
//Calculates and Displays Store, Sales, Tax rate, and Tax for La Jolla
printf("\nLa Jolla \tSale $%.2f\tTax %.2f%%\tTax $%.2f%\t\n\n",sales, LaJolla, sales*LaJolla/100);
break;
} //Storenum switch end
}
else
{
fflush(stdin);
printf("\nPlease enter 1,2 or 3\n");
printf("\n\tINVALID NUMBER ENTERED! Would you like to try again? (y/n) ");//allows repeat
scanf("%c", &cAgain); //scan input to repeat program
if (cAgain == 'y' || cAgain == 'Y')//repeats calculator
{
goto YES; //back to menu
}
else if (cAgain == 'n' || cAgain == 'N')//sends to end
return 0;
}
This is the error I see when I compile.
'if (storenum >=1 && if storenum <=3) { switch (storenum) } { case 1: printf("\nDel Mar \tSale $%.2f\tRate %.2f%%\tTax $%.2f%\t\n\n",sales, 7.25, sales*7.25/100)'
aborting compile