Advertisement
Aikihack

Softuni 1000 days after

Jun 17th, 2017
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. import java.time.LocalDate;
  2. import java.time.format.DateTimeFormatter;
  3. import java.util.Scanner;
  4.  
  5. /**
  6.  * Created by AiKiHack on 11.03.17.
  7.  */
  8. public class p13_1000DaysAfterBirth {
  9.     public static void main(String[] args) {
  10.         Scanner consolein = new Scanner(System.in);
  11.         LocalDate input = LocalDate.parse(consolein.nextLine(), DateTimeFormatter.ofPattern("dd-MM-yyyy"));
  12.  
  13.         String result = input.plusDays(999).format(DateTimeFormatter.ofPattern("dd-MM-yyyy"));
  14.         System.out.println(result);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement