Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TestingMyTest
- {
- public static int [] arrangearray(int[]num){
- int [] newnum = new int[num.length];
- int count = 0;
- int cou = 0;
- for (int i = 0; i<num.length; i++){
- if(num[i] < 0){
- newnum[count] = num[i];
- }
- else {
- newnum[num.length-cou] = num[i];
- cou++;
- }
- }
- return newnum;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement