how to get user input for a betting price (ie; 13/8)

I would like to get user input on a betting price for example 13/8
I could use two inputs with two variables but is there any other way to do it.

I then would do this calculation:
13/8 represents odds of 13/8 = 1.625/1 + 1 = 2.625
divided into 100 gives a percentage of 38.1% to one place of decimals
Topic archived. No new replies allowed.