+ import std.math; import std.typecons; - import std.math; /* Your task is to implement a function that will simplify the expression - x * n. The function returns true if x * n evaluates to a whole number and false ? ---- + x * n. The function returns true if x * n evaluates to a whole number and false - otherwise. Both x and n, are string representation of a fraction, and have the following format, ? ---- + otherwise. Both x and n, are string representation of a fraction, and have the following format, - / where both numerator and denominator are positive whole numbers. ? ---- + / where both numerator and denominator are positive whole numbers. - - You can assume that x, and n are valid fractions, and do not have zero as denominator. ? ---- + You can assume that x, and n are valid fractions, and do not have zero as denominator. - - >>> simplify("1/5", "5/1") ? ---- + >>> simplify("1/5", "5/1") - true + true - >>> simplify("1/6", "2/1") ? ---- + >>> simplify("1/6", "2/1") - false + false - >>> simplify("7/10", "10/2") ? ---- + >>> simplify("7/10", "10/2") + false - false - */ bool simplify(string x, string n)