daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Dec 11th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int IsShort;
  2.  
  3.         if(num1 < num2) {
  4.             IsShort = num1;
  5.         } else {
  6.             IsShort = num2;
  7.         }
  8.  
  9.         while (checkMarks < 3 || checkMarks > IsShort) {
  10.  
  11.                 try {
  12.                     checkMarks = Integer.parseInt(input.nextLine().trim());
  13.                 } catch (NumberFormatException e) {
  14.                     System.out.println("Try again! It needs to be a number! 3 is the minimum and maximum is the amount of smaller side of board. " + "Height is: " + gameboardHeight +"." + " Width is: " + gameboardWidth + ".");
  15.                     continue;
  16.                 }
  17.  
  18.                 if (checkMarks < 3 || checkMarks > IsShort) {
  19.                     System.out.println("Please give bigger number, 3 is the minimum and maximum is the amount of smaller side of board. " + "Height is: " + gameboardHeight +"." + " Width is: " + gameboardWidth + ".");
  20.                 }
  21.             }
  22.  
  23.     return checkMarks;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top