You can put this solution on YOUR website!
You can't. There is no way to express an irrational number as a ratio of two integers, because an irrational number is, by definition, a number which cannot be expressed in such a ratio.
You could instead round or truncate the number so that it is rational. For example, e = 2.718281828... is irrational (note the pattern, but it doesn't continue). But we could truncate it to 2.71 and use this as an approximation for e.