I am writing a program that takes from the user 2 numbers to represent the numerator and the denominator of a fraction, and it will then check if any of the numbers are negative, if they are the program will end and ask the user if he or she wants to try again. If the numerator is zero, the program will display a zero, if the denominator is a zero, the program will display "Your fraction is undefined." If the result is false for both of those, it checks if the numerator is greater than the denominator, if it is, the program will calculate and display a mixed number. The problem I have is reducing a fraction more than once, especially when the denominator is greater and the fraction can be reduced. If you guys can tell me what I am doing wrong or missing, thanks! The section concerning if the denominator is greater is blank because I am stuck on what to put there. I originally had it to where it would display a decimal, but I need it to be a fraction, so I deleted that part while trying to think of a way to display a fraction.
P.S. I am fairly new to programming, and I have not learned about functions yet, so please keep that in mind.