Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Func XacSuat($so1, $tile_so1, $so2, $tile_so2)
- If $tile_so1 + $tile_so2 = 100 then
- If $tile_so1 > $tile_so2 then
- Return $so1
- ElseIf $tile_so2 > $tile_so1 then
- Return $so2
- Else
- If $so1 > $so2 then
- Return Random($so2, $so1, 1)
- Else
- Return Random($so1, $so2, 1)
- EndIf
- EndIf
- Else
- MsgBox(64, "Message", "Tỉ lệ cộng lại phải bằng 100%")
- EndIf
- EndFunc
- MsgBox(64, "Message", XacSuat(1, 50, 2, 50))
Advertisement
Add Comment
Please, Sign In to add comment