Всё работает кроме последнего условия public static double percent(int a, int b) { //напишите тут ваш код double p = (double)b/a*100.00; return p; }