Advertisement
Guest User

dicegame

a guest
Jan 19th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public class dicegame{
  2. public static void main(String[] args) {
  3. int a = (int) (3*Math.random()+1);
  4. int b = (int) (3*Math.random()+1);
  5. if (a == 3 && b == 3) {
  6. System.out.println("You win!");
  7. boolean win = true;
  8. } else {
  9. System.out.println("You lose...");
  10. boolean win = false;
  11. }
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement