daily pastebin goal
12%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Top