convert 0.5 and 3 into a fraction

0.5 can be written as 1/2 and 3 can be written as 3/1 or simply 3.