ya_zay4eg

level09_Exception_exampleFromBucky

Jan 11th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1. level09
  2.  
  3. /*
  4.  
  5. */
  6. import java.util.*;
  7.  
  8. public class Solution
  9. {
  10.     public static void main(String[] args)
  11.     {
  12.         Scanner input = new Scanner(System.in);
  13.         int x = 1;
  14.         do
  15.         {
  16.             try {
  17.                 System.out.println("Enter first num: ");
  18.                 int n1 = input.nextInt();
  19.                 System.out.println("Enter second num: ");
  20.                 int n2 = input.nextInt();
  21.                 int sum = n1/n2;
  22.                 System.out.println("The sum is: " + sum);
  23.                 x=2;
  24.             }
  25.             catch (Exception e) {
  26.                 System.out.println("Ты серьезно?"+"\n"+"Не будь хуйлом"+"\n"+"Давай еще разок, Володя");
  27.  
  28.             }
  29.         } while (x==1);
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment