@@ -0,0 +1,1000 @@
+package problems;%0A%0Apublic class FractionToRecurringDecimal %7B%0A    public String fractionToDecimal(int numerator, int denominator) %7B%0A        if (denominator == 0)%0A            return %22NULL%22;%0A        %0A        boolean sign = false;%0A        if (numerator %3C 0) %7B%0A            numerator = -numerator;%0A            sign = !sign;%0A        %7D%0A        if (denominator %3C 0) %7B%0A            denominator = -denominator;%0A            sign = !sign;%0A        %7D%0A        StringBuilder sb = new StringBuilder();%0A        if (sign)%0A            sb.append('-');%0A        %0A        if (numerator %3E= denominator) %7B%0A            sb.append(numerator / denominator);%0A            numerator %25= denominator;%0A        %7D%0A        if (numerator == 0)%0A            return sb.toString();%0A        %0A        while ()%0A    %7D%0A    %0A    public static void main(String%5B%5D args) %7B%0A        FractionToRecurringDecimal fd = new FractionToRecurringDecimal();%0A        int num = 2;%0A        int de = 3;%0A        System.out.println(fd.fractionToDecimal(num, de));%0A    %7D%0A%7D%0A

Add Fraction to Recurring Decimal