首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
copyEvens
】的更多相关文章
copyEvens
public int[] copyEvens(int[] nums, int count) { int newIndex=0; int i=0; int newArray[] = new int[count]; while(newIndex < count ){ if( ( nums[i] % 2) ==0 ) newArray[newIndex++]=nums[i]; i++; } return newArray; } http://codingbat.com/prob/p134174…