Added 15 solutions

This commit is contained in:
rshaghoulian
2017-02-07 01:14:49 -08:00
parent 692821a288
commit b06588fddf
15 changed files with 406 additions and 0 deletions
@@ -0,0 +1,33 @@
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
private static int B;
private static int H;
private static boolean flag;
static {
Scanner scan = new Scanner(System.in);
B = scan.nextInt();
H = scan.nextInt();
scan.close();
if (B <= 0 || H <= 0) {
System.out.println("java.lang.Exception: Breadth and height must be positive");
flag = false;
} else {
flag = true;
}
}
public static void main(String[] args){
if(flag){
int area=B*H;
System.out.print(area);
}
}//end of main
}//end of class