Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.time.LocalDate;
- import java.time.LocalDateTime;
- import java.time.format.DateTimeFormatter;
- import java.util.Scanner;
- public class p13_1000Days {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
- LocalDate date = LocalDate.parse(scanner.nextLine(),formatter);
- LocalDate newdate = date.plusDays(999);
- System.out.println(newdate.toString());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement