-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPickCardGame.java
More file actions
63 lines (62 loc) · 1.6 KB
/
PickCardGame.java
File metadata and controls
63 lines (62 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package example;
public class PickCardGame {
public static void main(String args[]){
int number1 = (int)(2+Math.random()*13);
int number2 = (int)(Math.random()*4);
switch(number1){
case 2 :
System.out.print("The card you picked up is 2 ");
break ;
case 3 :
System.out.print("The card you picked up is 3 ");
break ;
case 4 :
System.out.print("The card you picked up is 4 ");
break ;
case 5 :
System.out.print("The card you picked up is 5 ");
break ;
case 6 :
System.out.print("The card you picked up is 6 ");
break ;
case 7 :
System.out.print("The card you picked up is 7 ");
break ;
case 8 :
System.out.print("The card you picked up is 8 ");
break ;
case 9 :
System.out.print("The card you picked up is 9 ");
break;
case 10 :
System.out.print("The card you picked up is 10 ");
break ;
case 11 :
System.out.print("The card you picked up is Jack ");
break ;
case 12 :
System.out.print("The card you picked up is Queen ");
break ;
case 13 :
System.out.print("The card you picked up is King ");
break ;
case 14 :
System.out.print("The card you picked up is Ace ");
break ;
}
switch(number2){
case 0 :
System.out.println("Of clubs");
break ;
case 1 :
System.out.println("Of Diamond");
break ;
case 2 :
System.out.println("Of Heart");
break ;
case 3 :
System.out.println("Of Spades");
break ;
}
}
}