public class Pruefung4_22_3
{
	final static int M = 100 ;  // Anzahl Simulationen

	public static void main(String[] args){
	double x0 = Math.random();
	System.out.println("x0 = " + x0) ;

	double[] xArr = new double[M];
	double[] zArr = new double[M];


	double sum1 =0;
	double sum2 =0;
	double x = x0;
	int count =0;

      for (int i = 0; i<M; i++)
	  {
	    xArr[i] = f(x);
	    x = xArr[i];

	    System.out.println("x[" + i + "] : "+ xArr[i] ) ;

		String s = new Double(xArr[i]).toString();
		int komma = s.indexOf(".");
		System.out.println("Kommaposition: "+ komma ) ;
		char c4 = s.charAt(komma+4);
		char c5 = s.charAt(komma+5);

		// Zahl aus c4 und c5 erzeugen... keine Zeit mehr...

	  }




	}

	static double f(double newX){
	 	return Math.log(newX)*Math.log(newX);
	}
}