Skip to content

Commit 926f966

Browse files
authored
Introduction to Java!
1 parent 907adfc commit 926f966

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
static Scanner input = new Scanner(System.in);
2+
static int B = input.nextInt();
3+
static int H = input.nextInt();
4+
static Boolean flag = B > 0 && H > 0;
5+
6+
static{
7+
if(!flag){
8+
System.out.println("java.lang.Exception: Breadth and height must be positive");
9+
}
10+
}
11+

0 commit comments

Comments
 (0)