could somebody help?
The link just shows addition of fractions and not determining whether a number is rational.
Did you know that anything that is able to be represented as a fraction, is a rational number?
Also, that computers can not store irrational numbers as actual numbers.
So, you'll need to pick what range of denominator you are willing to use as a maximum size for a rational number, and then determine whether any possible denominator results in an integer nominator.
Good luck with your assignment there.