‹ Back to the paper
Design a program which takes two integer parameters namely number of the day (between 1 and 366)…
Design a program which takes two integer parameters namely number of the day (between 1 and 366) and the year (in 4 digits) as inputs and displays the date i.e. day, month and year.
Also find the corresponding date exactly after (N) days of the present date by accepting the value of (N) from the user, where the value of (N) is in the limit ($1 \le N \le 100$).
Design your program which will enable the output in the format given below:
Sample 1
INPUT: DAY NUMBER : 233
YEAR : 2020
DATE AFTER : 17
OUTPUT:
20TH. AUGUST 2020
DATE AFTER 17 DAYS :
6TH. SEPTEMBER 2020
Sample 2
INPUT: DAY NUMBER : 360
YEAR : 2020
DATE AFTER : 45
OUTPUT:
25TH. DECEMBER 2020
DATE AFTER 45 DAYS :
8TH. FEBRUARY 2021
Answer
No answer yet.
From ISC 2021 Specimen Computer Science Paper 2, question 1.