All pastes #2072422 Raw Edit

Stuff

public text v1 · immutable
#2072422 ·published 2011-05-30 18:33 UTC
rendered paste body
public class test 
{
	public static void main(String[] args) {
		char[] arr1 = {' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
		char[] arr2 = {' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
		char[] arr3 = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
		
		int c = 0;
		
		//last psw -> 900
		char firstcurrent = '9';
		char seccurrent = '0';
		char thirdcurrent = '0';
		
		int i=0, j=0, k=0;
		
		//continue from 900 up to 999
		i = new String(arr1).indexOf(firstcurrent);
		j = new String(arr2).indexOf(seccurrent);
		k = new String(arr3).indexOf(thirdcurrent);
		
		for (;i<arr1.length; i++) {
			for (; j<arr2.length; j++) {
				if (j==0 && i!=0) {
					j++;
				}
				for (; k<arr3.length; k++) {
					System.out.println(arr1[i]+""+arr2[j]+""+arr3[k]);
					c++;
				}
				k=0;
			}
			j=0;
		}
		System.out.println("Wir haben insgesamt "+c+" zahlen durchlaufn");
		
	}
}