Search
Get Started
C
C#
•
3y 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
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,010
Members
View on Discord
Was this page helpful?
Yes
No
Z
ZtRaPz
OP
•
2/8/23, 6:58 PM
Any help will do
P
pip
•
2/8/23, 8:13 PM
ok
P
pip
•
2/8/23, 8:14 PM
so you see how you are accessing an object
"txtProductDescription
" and setting its text
?
Z
ZtRaPz
OP
•
2/8/23, 8:14 PM
Yeah
P
pip
•
2/8/23, 8:14 PM
you have to access the Total
, Subtotal
, and OrderTotal in the same way
Z
ZtRaPz
OP
•
2/8/23, 8:15 PM
Oh okay
P
pip
•
2/8/23, 8:15 PM
a lot of programming is finding patterns
Z
ZtRaPz
OP
•
2/8/23, 8:15 PM
so in the if statement do i have to do calculations
?
P
pip
•
2/8/23, 8:16 PM
you
'll probably have to do calculations factoring in the price and quantity right
?
Z
ZtRaPz
OP
•
2/8/23, 8:16 PM
yeah multiplying the price by the quantity
P
pip
•
2/8/23, 8:16 PM
so make sure that price and quantity are filled out
P
pip
•
2/8/23, 8:16 PM
using if statements
P
pip
•
2/8/23, 8:16 PM
then if they are both filled out
, you can do the calculation and set the text of the total and subtotal
Z
ZtRaPz
OP
•
2/8/23, 8:17 PM
Oh okay
Z
ZtRaPz
OP
•
2/8/23, 8:17 PM
i will try that out
Z
ZtRaPz
OP
•
2/8/23, 8:17 PM
Can you send me an example so that i can have an idea of what i can do
P
pip
•
2/8/23, 8:18 PM
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
P
pip
•
2/8/23, 8:18 PM
you just have to see the pattern
, do some copy pasting
, then you
'll be good
Z
ZtRaPz
OP
•
2/8/23, 8:19 PM
Oh alright nws thanks alot
A
Accord
•
2/9/23, 8:20 PM
Was this issue resolved
? If so
, run
/close
/close
otherwise I will mark this as stale and this post will be archived until there is new activity
.