import java.util.*;
public class Slot
{
public static void main (String [] args)
{
Scanner keyboard = new Scanner (System.in);
int tokens, w1, w2, w3;
String user;
tokens = 100;
System.out.print ("You have " + tokens + " tokens. Pull? ");
user = keyboard.next ();
while (!user.equalsIgnoreCase ("N"))
{
w1 = (int) (Math.random ()* 3 +1);
w2 = (int) (Math.random ()* 3 +1);
w3 = (int) (Math.random ()* 3 +1);
tokens = tokens-1;
System.out.println ("["+ w1 + "] [" + w2 + "] [" + w3+ "]");
if (w1 == 1 && w2 == 1 && w3 == 1)
{
System.out.println ("You have won 4 tokens!");
tokens = tokens+4;
}
else if (w1 == 2 && w2 == 2 && w3 == 3)
{
System.out.println ("You have won 8 tokens1");
tokens = tokens+8;
}
else if (w1 == 3 && w2 == 3 && w3 == 3)
{
System.out.println ("You have won 12 tokens!");
tokens = tokens + 12;
}
else
{
System.out.println ("You lost.");
}
System.out.print ("You have " + tokens + " tokens. Pull? ");
user = keyboard.next ();
if (tokens <= 0 || user.equalsIgnoreCase ("N"))
System.out.println ("You ended with " + tokens + " tokens.");
System.out.println ("Thanks for playing.");
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwpwdWJsaWMgY2xhc3MgU2xvdAp7CiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nIFtdIGFyZ3MpCiAgICB7CiAgICAgICAgU2Nhbm5lciBrZXlib2FyZCA9IG5ldyBTY2FubmVyIChTeXN0ZW0uaW4pOwogICAgICAgIGludCB0b2tlbnMsIHcxLCB3MiwgdzM7CiAgICAgICAgU3RyaW5nIHVzZXI7CiAgICAgICAgdG9rZW5zID0gMTAwOwogICAgICAgIFN5c3RlbS5vdXQucHJpbnQgKCJZb3UgaGF2ZSAiICsgdG9rZW5zICsgIiB0b2tlbnMuIFB1bGw/ICIpOwogICAgICAgIHVzZXIgPSBrZXlib2FyZC5uZXh0ICgpOwogICAgICAgIHdoaWxlICghdXNlci5lcXVhbHNJZ25vcmVDYXNlICgiTiIpKQogICAgICAgIHsKICAgICAgICAgICAgdzEgPSAoaW50KSAoTWF0aC5yYW5kb20gKCkqIDMgKzEpOwogICAgICAgICAgICB3MiA9IChpbnQpIChNYXRoLnJhbmRvbSAoKSogMyArMSk7CiAgICAgICAgICAgIHczID0gKGludCkgKE1hdGgucmFuZG9tICgpKiAzICsxKTsKICAgICAgICAgICAgdG9rZW5zID0gdG9rZW5zLTE7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoIlsiKyB3MSArICJdIFsiICsgdzIgKyAiXSBbIiArIHczKyAiXSIpOwogICAgICAgICAgICBpZiAodzEgPT0gMSAmJiB3MiA9PSAxICYmIHczID09IDEpCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoIllvdSBoYXZlIHdvbiA0IHRva2VucyEiKTsKICAgICAgICAgICAgICAgIHRva2VucyA9IHRva2Vucys0OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHcxID09IDIgJiYgdzIgPT0gMiAmJiB3MyA9PSAzKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4gKCJZb3UgaGF2ZSB3b24gOCB0b2tlbnMxIik7CiAgICAgICAgICAgICAgICB0b2tlbnMgPSB0b2tlbnMrODsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmICh3MSA9PSAzICYmIHcyID09IDMgJiYgdzMgPT0gMykKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuICgiWW91IGhhdmUgd29uIDEyIHRva2VucyEiKTsKICAgICAgICAgICAgICAgIHRva2VucyA9IHRva2VucyArIDEyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgeyAgICAgICAgICAgIAogICAgICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuICgiWW91IGxvc3QuIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludCAoIllvdSBoYXZlICIgKyB0b2tlbnMgKyAiIHRva2Vucy4gUHVsbD8gIik7CiAgICAgICAgICAgIHVzZXIgPSBrZXlib2FyZC5uZXh0ICgpOwogICAgICAgIGlmICh0b2tlbnMgPD0gMCB8fCB1c2VyLmVxdWFsc0lnbm9yZUNhc2UgKCJOIikpCiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiAoIllvdSBlbmRlZCB3aXRoICIgKyB0b2tlbnMgKyAiIHRva2Vucy4iKTsKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuICgiVGhhbmtzIGZvciBwbGF5aW5nLiIpOwogICAgICAgIH0KICAgIH0KfQ==
prog.asm:1: error: parser: instruction expected
prog.asm:2: error: parser: instruction expected
prog.asm:3: error: label or instruction expected at start of line
prog.asm:4: error: symbol `public' redefined
prog.asm:4: error: parser: instruction expected
prog.asm:5: error: label or instruction expected at start of line
prog.asm:6: error: parser: instruction expected
prog.asm:8: error: parser: instruction expected
prog.asm:9: error: parser: instruction expected
prog.asm:10: error: parser: instruction expected
prog.asm:11: error: parser: instruction expected
prog.asm:12: error: parser: instruction expected
prog.asm:13: error: label or instruction expected at start of line
prog.asm:14: error: parser: instruction expected
prog.asm:15: error: parser: instruction expected
prog.asm:16: error: parser: instruction expected
prog.asm:17: error: symbol `tokens' redefined
prog.asm:17: error: parser: instruction expected
prog.asm:18: error: parser: instruction expected
prog.asm:19: error: parser: instruction expected
prog.asm:20: error: label or instruction expected at start of line
prog.asm:21: error: symbol `System.out.println' redefined
prog.asm:21: error: parser: instruction expected
prog.asm:22: error: symbol `tokens' redefined
prog.asm:22: error: parser: instruction expected
prog.asm:23: error: label or instruction expected at start of line
prog.asm:24: error: parser: instruction expected
prog.asm:25: error: label or instruction expected at start of line
prog.asm:26: error: symbol `System.out.println' redefined
prog.asm:26: error: parser: instruction expected
prog.asm:27: error: symbol `tokens' redefined
prog.asm:27: error: parser: instruction expected
prog.asm:28: error: label or instruction expected at start of line
prog.asm:29: error: symbol `else' redefined
prog.asm:29: error: parser: instruction expected
prog.asm:30: error: label or instruction expected at start of line
prog.asm:31: error: symbol `System.out.println' redefined
prog.asm:31: error: parser: instruction expected
prog.asm:32: error: symbol `tokens' redefined
prog.asm:32: error: parser: instruction expected
prog.asm:33: error: label or instruction expected at start of line
prog.asm:34: error: symbol `else' redefined
prog.asm:35: error: label or instruction expected at start of line
prog.asm:36: error: symbol `System.out.println' redefined
prog.asm:36: error: parser: instruction expected
prog.asm:37: error: label or instruction expected at start of line
prog.asm:38: error: symbol `System.out.print' redefined
prog.asm:38: error: parser: instruction expected
prog.asm:39: error: symbol `user' redefined
prog.asm:39: error: parser: instruction expected
prog.asm:40: error: symbol `if' redefined
prog.asm:40: error: parser: instruction expected
prog.asm:41: error: symbol `System.out.println' redefined
prog.asm:41: error: parser: instruction expected
prog.asm:42: error: symbol `System.out.println' redefined
prog.asm:42: error: parser: instruction expected
prog.asm:43: error: label or instruction expected at start of line
prog.asm:44: error: label or instruction expected at start of line
prog.asm:45: error: label or instruction expected at start of line