There are three main forms of record of fractions - ordinary, mixed and decimal. If the numerator of a common fraction is more than denominator, then it is called "wrong". Improper fractions are used in intermediate calculations, and reference values and the end results will transform to the mixed look. For this purpose from an improper fraction allocate the whole part and write down separately from a fractional part which stops being wrong. Also the return operation - transformation of the mixed or decimal fraction to the improper common fraction is possible.

## Instruction

1. If it is necessary to write down the fraction which is written down in the mixed form in the form of an improper fraction, then at first it is necessary to find numerator of the resulting fraction. For this purpose increase the whole part of the mixed fraction by its denominator and add the received result to initial numerator - so you and receive numerator of the resulting fraction. It is necessary to leave a denominator of initial fraction without changes and in an improper fraction. For example, if in wrong ordinary it is required to transfer the mixed fraction 5 4/9, then in numerator of the mixed fraction it is necessary to put number 49 (5*9 + 4 = 49), and in a denominator to leave 9, that is 5 4/9 = 49/9.

2. If it is necessary to transfer decimal fraction to irregular shape, then it is possible to transfer at first it to the mixed form, and then to apply the algorithm described in the previous step. But there is a way to make it simpler. For this purpose it is better to begin with definition of a denominator of the resulting improper fraction - it will be number ten built in the degree equal to the number of figures after a decimal comma. And the initial decimal fraction from which it is necessary to withdraw a decimal comma will be numerator of an improper fraction. For example, if the initial decimal fraction is equal 2.45, then number 100 as the number of categories after a comma is equal to two will be a denominator, and 10 in the second degree is 100. In numerator there will be number 245, that is 2.45 = 245/100.

3. Reduce the improper fraction received as a result of calculations if its numerator and a denominator have any common divisor. For example, in the example used in the previous step the improper fraction 245/100 turned out. Its numerator and a denominator have the greatest common divisor equal to five therefore the fraction can be reduced, having divided numerator and a denominator into this number. 245/5=49, and 100/5=20, is meant by 245/100=49/20.