# [Solved]How do I - Math - How do I do Percentages?

Get help using Construct 2

### » Thu Jul 30, 2015 12:31 am

Hello community, I am bad at math!

I remember from when I was in school, it was something something 100 over a number? Haha, that's irrelevant right now...

Basically, uh. How do I type into string percentages?

How do I get the system to evaluate a number and give me the closest percent to that, and then of course "round" up or down?

I'm reading https://www.scirra.com/manual/126/system-expressions and also viewtopic.php?t=72716&start=0 as I wait for one of you lovely people to save me from my ineptitude of all things math.

Final question, what is the difference between the "Beginner's Questions" and "How do I" forum?
Last edited by SwatHound on Thu Jul 30, 2015 3:16 am, edited 1 time in total.
B
6
S
2
Posts: 60
Reputation: 1,242

### » Thu Jul 30, 2015 2:05 am

round( value * 100 / max)

max is the highest the value can reach. value is the number to test.
B
71
S
22
G
273
Posts: 3,825
Reputation: 150,793

### » Thu Jul 30, 2015 3:02 am

@blackhornet Thank you so much my friend!

After fiddling with it for about 15 minutes, throwing in values randomly left and right, I seemed to have figured it out. or better yet, I know which numbers to put in to get my percents, I don't particularly know why it worked out as such though.
B
6
S
2
Posts: 60
Reputation: 1,242

Return to How do I....?

### Who is online

Users browsing this forum: No registered users and 2 guests