❔ C# Help Outputs Help
Hi guys i need help in displaying the Subtotal and total for this programme and then the discount of 10% if the subtotal is greater than 5000 otherwise the discount would be 0. It would be appreciated thanks
14 Replies
Any help will do
ok
so you see how you are accessing an object "txtProductDescription" and setting its text?
Yeah
you have to access the Total, Subtotal, and OrderTotal in the same way
Oh okay
a lot of programming is finding patterns
so in the if statement do i have to do calculations?
you'll probably have to do calculations factoring in the price and quantity right?
yeah multiplying the price by the quantity
so make sure that price and quantity are filled out
using if statements
then if they are both filled out, you can do the calculation and set the text of the total and subtotal
Oh okay
i will try that out
Can you send me an example so that i can have an idea of what i can do
so i'm not going to do your homework for you, but what i will say is you have most of the concept already written in your code
you just have to see the pattern, do some copy pasting, then you'll be good
Oh alright nws thanks alot
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.