Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
64
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.LocalDateTime;
  3. import java.time.format.DateTimeFormatter;
  4. import java.util.Scanner;
  5.  
  6. public class p13_1000Days {
  7. public static void main(String[] args) {
  8. Scanner scanner = new Scanner(System.in);
  9.  
  10.  
  11. DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
  12. LocalDate date = LocalDate.parse(scanner.nextLine(),formatter);
  13. LocalDate newdate = date.plusDays(999);
  14. System.out.println(newdate.toString());
  15.  
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement