This commit is contained in:
2024-11-05 14:54:07 +03:00
parent b1f377bfec
commit 2986cfa864
6 changed files with 62 additions and 0 deletions

13
labs/lab3/die.java Normal file
View File

@ -0,0 +1,13 @@
import java.util.Random;
public class die {
public static void main(String args[]) {
Random rand = new Random();
int die1 = rand.nextInt(6) + 1;
int die2 = rand.nextInt(6) + 1;
System.out.println("Dice 1: "+die1+" Dice 2: "+die2+" Sum of two dice: "+(die2+die1));
}
}