Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DiceGame{
- public static void main(String[] args) {
- int a = (int) (3*Math.random()+1);
- int b = (int) (3*Math.random()+1);
- boolean win = a == 3 && b == 3;
- if (a == 3 && b == 3) {
- System.out.println("You win!");
- } else {
- System.out.println("You lose...");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement