static void Main(string[] args) { Fraction copyFromfraction = new Fraction(20, 60); Fraction fraction = new Fraction(copyFromfraction); Console.WriteLine(" {1}/{2} can be reduced to {0} and the value is {3}.", fraction.ReducedFraction(), fraction.GetNumerator(), fraction.GetDenominator(), fraction.GetFractionValue()); Console.ReadLine(); }
static void Main(string[] args) { // Variables int numer; int denom; // Initialization numer = 20; denom = 60; // Makes new Fraction Fraction newFraction = new Fraction(numer, denom); for (int i = 0; i < 10; i++) { Console.WriteLine("Your fraction is " + newFraction.ReducedFraction()); newFraction.Numerator++; newFraction.Denominator++; } // Waits to close window Console.ReadLine(); }