Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1.  
  2.  
  3. public class TestingMyTest
  4. {
  5. public static int [] arrangearray(int[]num){
  6. int [] newnum = new int[num.length];
  7. int count = 0;
  8. int cou = 0;
  9. for (int i = 0; i<num.length; i++){
  10. if(num[i] < 0){
  11. newnum[count] = num[i];
  12. }
  13. else {
  14. newnum[num.length-cou] = num[i];
  15. cou++;
  16. }
  17. }
  18. return newnum;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement