You are basically asking how to add two fractions together:
Assuming your rational numbers are in the form of a fraction with a numerator over a denominator (could be stored as an ordered pair, or an ordered triple [for mixed numbers]).
If the numbers are mixed numbers the first step is to convert them to improper fractions.
To add rational numbers the denominators must be the same.
If they are not the same then the fractions need to be converted into equivalent fractions with the same denominator.
Then the fractions are added by adding together the numerators
Finally the result is simplified by dividing the numerator and denominator by their Highest Common Factor (HCF).
If the numerator is greater than or equal to the denominator, then the fraction is converted to a mixed number.
To convert a mixed number to an improper fraction, the new numerator is the whole number multiplied by the denominator plus the original numerator; the new denominator is the original denominator.
To find the new denominator for equivalent fractions it is best done by finding the lowest common multiple (LCM) of the denominators.
To find the LCM, there are various methods, but I would suggest* using the fact that the product of the HCF and LCM of two number is the product of those two numbers; then the LCM is the product of the numbers divided by their HCF. The HCF of two numbers is easily found by using Euclid's method:
to find the HCF of two numbers a and b:
1) find the remainder (r) of the first number (a) divided by the second (b)
2) If the remainder is 0, the HCF is the second number; otherwise
3) replace the first number (a) by the second number (b)
4) replace the second number (b) bu the remainder (r)
5) repeat from step 1.
(If a < b the first time through the algorithm will swap a and b so that a > b.)
There is no need to check for denominators being the same as the LCM will work out to be the current denominator.
To convert a fraction with one denominator to an equivalent fraction with a new denominator, the new numerator is found by multiplying the old numerator by the new denominator and divide by the current denominator (which is the same as finding out how many times the current denominator divides into the new denominator and multiplying the numerator by this).
I
To do the addition, the numerators are added together and the denominator is kept.
To simplify the fraction find the HCF of the numerator and denominator and divide each by this HCF. (No real need to check for HCF = 1 → fraction already as simple as possible but dividing by 1 will leave the numerator and denominator as they are!)
To convert an improper fraction to a mixed number, divide the numerator by the denominator to get a whole number quotient and a remainder. The remainder is the numerator over the denominator for the fraction of the mixed number with the quotient as the whole number. If the whole number is zero, then the fraction is a proper fraction; if the remainder is zero, then the fraction is a whole number.
-----------------------
* This suggestion means the LCM function becomes:
LCM(a, b) = a * b / HCF(a, b)
And only the HCF function need be worked out in a full algorithm. For two numbers Euclid's method provides an easy function. For more than 2 numbers I would use the prime factorization method.
They represent rational numbers.
There are no consecutive rational numbers. Between any two rational numbers there are an infinity of rational numbers.
Terminating numbers are decimal representations of rational numbers. Nonterminating numbers may or may not be rational numbers.
Some rational numbers are whole numbers, some are not. The set of whole numbers is a proper subset of rational numbers.
There are infinitely many rational numbers between any two rational rational numbers (no matter how close).
Rational numbers represent a tiny part of real numbers.
The letter Q in blackboard bold is used to represent the set of rational numbers - Q standing for quotient.
The quotient of two rational numbers.
Integers are the same as whole numbers. Integers are a proper subset of rational numbers.
Whole numbers and integers are the same thing. They are a proper subset of rational numbers.
Rational number.
You cannot. The diagonal of a unit square cannot be represented by a rational number. However, because rational numbers are infinitely dense, you can get as close to an irrational number as you like even if you cannot get to it. If this approximation is adequate than you are able to represent the real world using rational numbers.
a fraction is the representation of a number as the quotient of two integers. all rational numbers can be written as a fraction, and all fractions represent rational numbers.
Concentric circles. The set of whole numbers is a subset of the set of integers and both of them are subsets of the set of rational numbers.
Concentric circles. The set of whole numbers is a subset of the set of integers and both of them are subsets of the set of rational numbers.
Whole numbers are integers.The ratio of two integers, p and q where q is not zero, is a rational number.
They represent rational numbers.