I am trying to write this program to show that all customers get a 30% discount and if you are a student and pay in cash then if answer is yes, you will get an additional 20%. This is what I have and am really stuck. Have went over my chapters as well as online and seem to be in a rut. Can any help?
This is what I have:
#include <stdio.h>
#define SALERATE 0.3
#define STURATE 0.2
int main (void)
{
float PUR, /* Total price of purchases */
SALEDIS, /* Primary sale discount */
STUDIS, /* Student/Cash discount */
NET; /* Net amount to pay after discounts */
char STU, /* Student status indicator (Y/N)? */
CASH; /* Case sale indicator (Y/N)? *)
printf ("Ace Sports Bill\n\n");
printf ("Total price of purchases? "); scanf (%lf, &PUR);
printf ("Is this customer a student (Y/N)? "); fflush (stdin); scanf ("%c", &STU);
if (STU = = 'Y' || STU = = 'y') STUDIS = PUR * SALERATE; PUR - SALERATE * STURATE;
(This is where I am stuck, I do not know if the STU is correct and where to go to from that point on)
Thanks
Kathryn