Garmaine Staff asked 2 years ago
Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 45 mins ago.

I have never used Stack Overflow, this is my first time so if I make any mistakes I apologize. Self Taught programmer here

So to start I am making a Dispensary Menu Program as a Personal Project I'm doing that will Have 3 sections

  1. Buying (CheckOut Program) – The issue I am currently having
  2. Information Section (Containing different information about how Pricing Works and the different types of strains carried (currently working on that separate)
  3. About Us Section (About the "company") -Working on Separate

So Once you Hit the number 1 you are taken to this Menu Screen

Once the user is here you would Select the Item you would like to purchase by pressing Any number from 1-4,(or 5 to exit the program)

Let's say you pick 1, the program would respond back with:

You Chose Blue Zkittles

The program would then prompt the user to enter How many grams they would like:

(To run into the problem, enter either of the following amounts: 3.5, 7, 14, 28, 448)

Once entered the program will then ask if the user is a member and Will ask to Select 1 for yes and 2 for No

(To run into the Problem Enter 1)

FINALLY, this is where the problem Begins.

The Program (As it should), because 1 was selected meaning the person is a member, the message "Thank you for being a Member you Qualify for our discount!!"

Then the Calculations is performed (here where things get messy and info will be in the code provided)

The program calculates the base amount of the item (Which is $10.00) and is multiplied by the Number of Grams the user inputted to get the TotalBTax variable(Which is Total Before Tax) and displays the amount, Then Tax is Calculated by multiplying The TotalBTax Amount by the Tax Variable (Which is 0.06) and displays the amount as well. Only for users that select 1 will get the extra input of Total(Before Discount) and the Discount amount.

In this case, the Total(Before Discount is $37.10) and the Discount is ($12.10)

After that the program is ONLY supposed to display the Grand Total(After Discount) and the number the variable holds. However, it displays extra information which would is the price would be without being a member

Thank you for being a member! you Qualify for our discount!! Your total Before tax is: $35.0 Taxed Amount : $2.1 Total(Before Discount):$37.1

Discount: $12.1

Grand Total(After Discount): $25.0

This Part Should NOT be there if number 1 is selected Your total Before tax is: $$35.00

Taxed Amount :$ $2.10

Grand Total:$ $37.10

Could someone help me find out what I did wrong, and some tips to maybe shorten the program down if possible? I feel as though there is an easier way to do this but I can't seem to figure that out. Also the other cases on the bottom are empty because I have not Worked on that section yet. Thank you and hope to speak to some of you soon.

EDIT: It Will Not let me post this with the code So I will try to add it somewhere if retype this