c# calculate a discount
Hi guys i'm trying to makeup calcultor for discount but my does not work if anyone Can help plzaz
11 Replies
try / 100d
Doesn't work
it did work it's my bad thank you
you saved me
np
but what does d stand for
double
Servator
REPL Result: Success
Result: int
Compile: 141.400ms | Execution: 15.492ms | React with ❌ to remove this embed.
Servator
REPL Result: Success
Result: double
Compile: 278.481ms | Execution: 16.628ms | React with ❌ to remove this embed.
i'm new in learning c#
int / int will return int
int / double will return double
Servator
REPL Result: Success
Result: ValueTuple<int, double>
Compile: 273.975ms | Execution: 34.045ms | React with ❌ to remove this embed.
ok this complicatted i did actually first write double but i did not word and did not inderstand why
i writed like this :
pap =((double)pp)*((double)tr/(double)100)