public class CycFileTer
{
public static void main(String[] args)
{
int []array = new int[]{1,2,3,4,5,6,7,8,9,10};
System.out.println("这里有10个数字.把能被2整除的数字全部输出");
//int zheng = 0;
for(int i:array)
if(i.equals((array%2)==0))
System.out.println("["+i+"]");
}
}C:\Users\Administrator\Desktop |
|