Hey all, I'm a Java newbie currently in my first programming course at university. I'm working on a programming assignment in which I have to display if a fraction is proper or improper, and display the fraction's most simplified form. I've got all bases covered except one; mixed numbers. Suppose the user inputs 10 for the numerator variable and 4 for the denominator variable. I need a way for the system to compute that result is 2.5, and then display it as 2 + 1/2. Likewise, I need my program to do this for any fraction that would result in a mixed number (12/5 is 2 + 2/5, 43/6 is 7 + 1/6, etc.). It should be said that I also need the simplest way to do this, so as to not get ahead of myself or the rest of the class. The instructor may not like that, she is sort of particular. Thanks to anyone who replies in advance!
P.S. please do not over work yourself and write a whole program, I've truly got all other aspects of this program covered. This one part only eludes me because we haven't been taught this and I can't find a straight answer online.
P.S. please do not over work yourself and write a whole program, I've truly got all other aspects of this program covered. This one part only eludes me because we haven't been taught this and I can't find a straight answer online.