Announcement

Collapse
No announcement yet.

math question calculation (percentages)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • naxo
    replied
    Thanks mate, very helpful the idea to assigning number variables solves directly any number needed to calculate for

    Leave a comment:


  • Shrek
    replied
    Code:
    X [COLOR="#FF0000"]=[/COLOR] [COLOR="#000000"]5[/COLOR]
    Y [COLOR="#FF0000"]=[/COLOR] [COLOR="#000000"]10[/COLOR]
    Z [COLOR="#FF0000"]=[/COLOR] [COLOR="#0000FF"]math.floor[/COLOR](X[COLOR="#FF0000"]/[/COLOR]Y [COLOR="#FF0000"]*[/COLOR] [COLOR="#000000"]100[/COLOR])
    Dialog[COLOR="#FF0000"].[/COLOR]Message([COLOR="#800080"]""[/COLOR][COLOR="#FF0000"],[/COLOR]Z[COLOR="#FF0000"]..[/COLOR][COLOR="#800080"]"%"[/COLOR])

    Leave a comment:


  • naxo
    started a topic math question calculation (percentages)

    math question calculation (percentages)

    Hi:
    To anybody who knows or are math experts, if i do this calculation for percentages:

    3000 megabytes -----------100 %
    x megabytes ----------- 50 %

    it should be calculated as follows:

    3000 * 50/100 = 1500

    In programming for example to make progress install, how do you translate pure maths formula to lua? its correct write this as is it on the text progress ( for example or anywhere )?
Working...
X