Id: 570126; Nick: n/a; Timestamp: 2009-04-30 18:58:57; Pasted as: Java
Description: JAVA code for bubblesort
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
int [] rij ={6,4,3,9,2,5,8,1};
		int hulp;
 
		for(int i=rij.length;i>1;i--)
		{
			for(int j=0;j<i-1;j++)
			{
				if(rij[j]>rij[j+1])
				{
					hulp=rij[j];
					rij[j]=rij[j+1];
					rij[j+1]=hulp;
				}
			}
		}
 
Options: New, Download,
;
Copyright © 2006 by Zyberdog - Some rights reserved. (Browse/Disclaimer/Stats/About) - Highlighted with GeSHi
Nothing to see here.