Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Babelki {
- public void porownanie(int a, int b, int c, int d, int e, int f, int g)
- {
- int tab[] = {a, b, c, d, e, f, g};
- int temp;
- for(int i=0; i<tab.length; i++)
- {
- for(int j=0; j<tab.length-1; j++)
- {
- if(tab[j+1]>tab[j])
- {
- temp = tab[j+1];
- tab[j+1] = tab[j];
- tab[j] = temp;
- }
- }
- }
- for (int k=0; k<tab.length; k++)
- {
- System.out.print(tab[k] +" ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement