C+ Programming Homework Help (Not C++)
Sorry not sure what you mean.
Do you mean how would you write the result of n/d as a fraction? - You could simply printf("%u/%u",n,d)
If you want the fraction n/d as a reduced fraction you will have to write a function to find the common multiple.
ps. there is no need for the decimal() function call, you could just do the sum in the printf.