Finding 30% of Tax. (Maths.)
#1

How do I get this to remove 30% of the value. Like so:

pawn Код:
subtotal = benefits + rank + onlinebonus + faction;
    taxtotal = subtotal / 100 * 30;
    total =  taxtotal;
Reply
#2

pawn Код:
subtotal = benefits + rank + onlinebonus + faction;
taxtotal = subtotal / 100 * 30;
total =  subtotal-taxtotal;
You forgot one thing...

You could also use this:
pawn Код:
subtotal = benefits + rank + onlinebonus + faction;
total = subtotal / 100 * 70;
Or this:
pawn Код:
total = (benefits + rank + onlinebonus + faction) / 100 * 70;
Reply
#3

Wondering if it's not this:
pawn Код:
total = taxtotal + subtotal;
Anyway, to remove 30% off something you just multiply it with 0.7 (70%).
Reply
#4

Thanks guys!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)