Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lab08;
- import java.util.Scanner;
- public class BirthDateTime {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- int low = 1950;
- int high = 2010;
- int year = 0;
- System.out.println("Enter your birth year 1950-2010.");
- year = SafeInput.getRangedInt(in, "Enter your birth year 1950-2010.", low, high);
- low = 1;
- high = 12;
- int month = 0;
- System.out.println("Enter your birth month 1-12.");
- month = SafeInput.getRangedInt(in, "Enter your birth month 1-12.", low, high);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement