C
C#7mo ago
Ewan

✅ Trying to calculate percentage value to 2dp

Im trying to get a total out of 35 and then find the percentage value to 2dp but it gives 0 for some reason, help!
No description
6 Replies
Angius
Angius7mo ago
Cast that total to a float
MODiX
MODiX7mo ago
Angius
REPL Result: Success
15 / 35
15 / 35
Result: int
0
0
Compile: 299.662ms | Execution: 22.957ms | React with ❌ to remove this embed.
Angius
Angius7mo ago
This times 100 is still 0
Ewan
Ewan7mo ago
oooo? ok ill try that
Angius
Angius7mo ago
Or try total / 35f * 100f
Ewan
Ewan7mo ago
AH ok it worked thank you! i get catshy
Want results from more Discord servers?
Add your server
More Posts