Added 25 solutions

This commit is contained in:
rshaghoulian
2017-02-24 00:24:47 -06:00
parent 05ce4b1476
commit af8c2969a4
50 changed files with 1562 additions and 277 deletions
@@ -0,0 +1,21 @@
// Author: Rodney Shaghoulian
// Github: github.com/rshaghoulian
// HackerRank: hackerrank.com/rshaghoulian
import java.util.Scanner;
import java.util.InputMismatchException;
public class Solution {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
try {
int x = scan.nextInt();
int y = scan.nextInt();
System.out.println(x/y);
} catch (InputMismatchException e) {
System.out.println(e.getClass().getName());
} catch (ArithmeticException e) {
System.out.println(e.getClass().getName() + ": / by zero");
}
}
}