package demo10_28;
import java.util.Scanner;
public class test5 {
public static void main(String[] args) {
int i;
for (i = 0; i < 1000; i++) {
System.out.println("请输入一个整数");
Scanner sc = new Scanner(System.in);
int y = sc.nextInt();
if (y % 3 == 0) {
if ((y % 5 == 0) && (y % 7 == 0)) {
System.out.println("能被3,5,7整除");
} else if (y % 5 == 0) {
System.out.println("能被3,5整除");
} else if (y % 7 == 0) {
System.out.println("能被3,7整除");
} else {
System.out.println("能被3整除");
}
} else if (y % 5 == 0) {
if (y % 7 == 0) {
System.out.println("能被5,7整除");
} else {
System.out.println("能被5整除");
}
} else if (y % 7 == 0) {
System.out.println("能被7整除");
}
else {System.out.println("不能被3,5,7中任意一个数整除");}
System.out.println("\n");
}
}
}