Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- int number = 104;
- int bot = 0;
- int top = 100;
- if(rangeCheck(number, bot, top))
- {
- JOptionPane.showMessageDialog(null,"Valid");
- }
- else
- {
- JOptionPane.showMessageDialog(null,"Invalid");
- }
- }
- public static boolean rangeCheck(int num, int min, int max)
- {
- return num > min && num < max;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement