public static String percent(double p1, double p2) {
        String str;
        if (p1 == 0.0) {
            return "0.00";
        }
        double p3 = p1 / p2;
        DecimalFormat df1 = new DecimalFormat(".00");
        if (p3 * 100 < 1) {
            df1 = new DecimalFormat("0.00");
        }
        str = df1.format(p3 * 100);
        return str;
    }