
public class augensumme
{


	public static void main(String [] args)
	{
		int ziehungen = 100;
		int p5 = 0;
		int p7 = 0;

		for(int i=0; i<ziehungen; i++)
		{
			int summe = 0;

			while( (summe!=5) && (summe!=7) )
			{
				int wuerfel1 = (int)Math.round( Math.random()*6 )+1;
						System.out.println("  " + wuerfel1);

				int wuerfel2 = (int)Math.round( Math.random()*6 )+1;
				summe = wuerfel1 + wuerfel2;
			}
			if (summe == 5) p5++;
			else if (summe == 7) p7++;
		}
		System.out.println("p5: " + p5);
		System.out.println("p7: " + p7);
		double verhaeltnis = 1.0-(double)p5/(double)p7;
		System.out.println("p5 : p7: " + (double)p5/(double)p7 );
		System.out.println("p7 vor p5: " + (double)p7/(p7+p5) );

	}


}


