Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.time.LocalDate;
- import java.time.format.DateTimeFormatter;
- import java.util.Scanner;
- public class e13_1000DaysAfterBirth {
- public static void main(String[] args) {
- Scanner console = new Scanner(System.in);
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-uuuu");
- LocalDate birthDate = LocalDate.parse(console.nextLine(), formatter);
- LocalDate afterDate = birthDate.plusDays(999);
- System.out.println(afterDate.format(formatter));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement