Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int temp;
- for (int i =0; i<array.length;i++) {
- for (int j = 1; j<array.length-i;j++) {
- if (array[j-1]<array[j]) {
- temp=array[j-1];
- array[j-1] = array[j];
- array[j] = temp;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement