public class Main {
public static void selectForDiscount(int[] billsAmount) {
for (int i = 0; i < billsAmount.length; i++) {
for (int j = 0; j < billsAmount[i] / 2; j++) {
if (j * j == billsAmount[i]) {
System.out.println(i);
}
}
}
}
public static void main(String[] args) {
selectForDiscount(new int[]{5, 1, 0, 9, 15, 25, 65, 78, 100});
}
}
Comments
Leave a comment