C
C#2y ago
ZtRaPz

❔ 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
ZtRaPz
ZtRaPzOP2y ago
Any help will do
pip
pip2y ago
ok so you see how you are accessing an object "txtProductDescription" and setting its text?
ZtRaPz
ZtRaPzOP2y ago
Yeah
pip
pip2y ago
you have to access the Total, Subtotal, and OrderTotal in the same way
ZtRaPz
ZtRaPzOP2y ago
Oh okay
pip
pip2y ago
a lot of programming is finding patterns
ZtRaPz
ZtRaPzOP2y ago
so in the if statement do i have to do calculations?
pip
pip2y ago
you'll probably have to do calculations factoring in the price and quantity right?
ZtRaPz
ZtRaPzOP2y ago
yeah multiplying the price by the quantity
pip
pip2y ago
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
ZtRaPz
ZtRaPzOP2y ago
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
pip
pip2y ago
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
ZtRaPz
ZtRaPzOP2y ago
Oh alright nws thanks alot
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server