-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcricketgame.java
More file actions
46 lines (46 loc) · 1.68 KB
/
cricketgame.java
File metadata and controls
46 lines (46 loc) · 1.68 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
import java.util.*;
class cricketbot
{
public static void main(String args[])
{
int a,b,c,d,e,f,g,h,i,j,k,s;
Scanner sc=new Scanner(System.in);
System.out.println("BEWARE!! ONLY NUMBERS ARE ACCEPTED HERE. IF ANY OTHER ALPHABET FOR SYMBOL COMES THEN WHOLE PLAY WILL CRASH");
System.out.println("let's play cricket");
System.out.println("I will take heads");
System.out.println("HEADS won");
System.out.println("I will take batting first");
System.out.println("Bowl fast");
a=sc.nextInt();
System.out.println("6 runs");
b=sc.nextInt();
System.out.println("0runs");
c=sc.nextInt();
System.out.println("outttt");
d=sc.nextInt();
System.out.println("4 runs");
e=sc.nextInt();
System.out.println("2 runs");
f=sc.nextInt();
System.out.println("6 runs");
System.out.println("End of my over");
System.out.println("TARGET: 19 RUNS");
g=sc.nextInt();
System.out.println("OMG! That's high enough & it is a 6");
h=sc.nextInt();
System.out.println("2 runs");
i=sc.nextInt();
System.out.println("OUT");
j=sc.nextInt();
System.out.println("Again a 6");
System.out.println("4 runs from 2 balls");
k=sc.nextInt();
System.out.println("AGAIN OUT");
System.out.println("4 runs from 1 ball");
s=sc.nextInt();
System.out.println("OMG! That's high and that's a sixerrrrrr!!!!!!");
System.out.println("CONGRATS ON WINNING");
System.out.println("BYE! THANKS FOR PLAYING WITH ME");
System.out.println("CODED BY SOHAM");
}
}