Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 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. DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
  11. LocalDate date = LocalDate.parse(scanner.nextLine(),formatter);
  12. LocalDate newdate = date.plusDays(999);
  13. System.out.println(newdate.toString());
  14.  
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement