Guest User

Untitled

a guest
Jun 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. int[] a= {0,5,2,4,7,1,3,19};
  2. int[] b= new int[a.length-3];
  3. System.arraycopy(a, 1, b, 0, a.length-3);
  4.  
  5.  
  6.  
  7.  
  8. for (int i=0; i<a.length; i++) {
  9.  
  10. if (a[i] % 2 != 0) {
  11.  
  12.  
  13. System.out.print("Ко-во непарных чисел - " + b.length);
  14. break;
  15.  
  16. }
  17.  
  18.  
  19. }
Add Comment
Please, Sign In to add comment