Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. package lab08;
  2. import java.util.Scanner;
  3. public class BirthDateTime {
  4.  
  5. public static void main(String[] args) {
  6. Scanner in = new Scanner(System.in);
  7.  
  8. int low = 1950;
  9. int high = 2010;
  10. int year = 0;
  11. System.out.println("Enter your birth year 1950-2010.");
  12. year = SafeInput.getRangedInt(in, "Enter your birth year 1950-2010.", low, high);
  13.  
  14. low = 1;
  15. high = 12;
  16. int month = 0;
  17. System.out.println("Enter your birth month 1-12.");
  18. month = SafeInput.getRangedInt(in, "Enter your birth month 1-12.", low, high);
  19. }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement