All pastes #808357 Raw Edit

Slot Machine

public java v1 · immutable
#808357 ·published 2007-12-07 14:21 UTC
rendered paste body
import java.util.Random;import java.util.Scanner;import javax.swing.JFrame;import javax.swing.JPanel;public class tiger{	public static void main(String arg[])	{	Random randomnumber = new Random();	Scanner input = new Scanner(System.in);	int a = 0;	int sum=0;		// Start the game	System.out.println("\n\t\t\tWelocme to play Slot Machine");	System.out.print("Start");	String inputing = input.nextLine();		for (int i = 1; i<=3; i++){			for (int j = 1; j<=1; j++){			a = randomnumber.nextInt(11);						sleep();			System.out.printf( "%d\t", a );						}			sum += Math.pow(10, 3-i) * a;		} // end for-loop		//sum = 100*a + 10*a + a;		System.out.println();		System.out.printf("The total amount of thirrd genrated numbers: %d",sum);	// finish the game	} // end main method  private static void sleep() {		try {      Thread.sleep(3000);		} catch (InterruptedException e) {      e.printStackTrace();		}	}// end sleep	}//http://hk.geocities.com/newqooland/g3.html?