Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ((quantity>=25) && (quantity<=50) && (choice=='y') || (choice=='Y')) //don"t execute as expected when Y is input//
- {
- cost = quantity * 320 + MOULD; //MOULD is a constant, if the user input 'y' or 'Y' for yes, $3500 is added to cost
- discount = 0.0; // Discount is only given when quantity is over 50
- GCT = 0.165 * cost;
- total = cost + GCT;
- test= test+1; //Am printing a report a the end of the case so i use this to track is any conditions were met
- }
- if ((quantity>50) && (choice=='y') || (choice=='Y'))
- {
- cost = quantity * 320 + MOULD;
- discount = cost * 0.05;
- Dis_Prize = cost - discount;
- GCT = 0.165 * Dis_Prize;
- total = Dis_Prize + GCT;
- test= test+1;
- }
- if ((quantity>=25) && (quantity<=50) && (choice=='n') || (choice=='N'))
- {
- cost = quantity * 320;
- discount = 0.0;
- GCT = 0.165 * cost;
- total = cost + GCT;
- test= test+1;
- }
- if((quantity>50) && (choice=='n') || (choice=='N'))
- {
- cost = quantity * 320;
- discount = cost * 0.05;
- Dis_Prize = cost - discount;
- GCT = 0.165 * Dis_Prize;
- total = Dis_Prize + GCT;
- test= test+1;
- }
- if ((choice!='y') && (choice!='Y') && (choice!='n') && (choice!='N'))
- {
- printf("THE OPTIONS FOR DESIGN IS EITHER YES(Y) OR NO (N)n");
- test = 0;
- }
- if (quantity < 25)
- {
- printf("YOU ARE NOT ALLOWED TO ORDER LESS THAN 25 SHIRTSn");
- test = 0;
- }
- break;
Add Comment
Please, Sign In to add comment