Advertisement
Guest User

Untitled

a guest
Feb 13th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import java.time.LocalDate;
  2. import java.time.format.DateTimeFormatter;
  3. import java.util.Scanner;
  4.  
  5. public class e13_1000DaysAfterBirth {
  6. public static void main(String[] args) {
  7. Scanner console = new Scanner(System.in);
  8. DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-uuuu");
  9. LocalDate birthDate = LocalDate.parse(console.nextLine(), formatter);
  10. LocalDate afterDate = birthDate.plusDays(999);
  11. System.out.println(afterDate.format(formatter));
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement