How can i find the day of the month using the day of the year?
For example day 16 is January 16. Day 35 is February 4
My program prompts for a day in the year (1-365) and year.
So input can be day 252 and year 2017
I already initialized a boolean for leap Years.
I already divided this into 12 months (Jan-Dec. EX: if the day input is 1-31 its January) using an if statement.
if(day >=1 && day <=31)
{
month = 1;
monthName = "January";
}
My program is almost done, this is my last step but I have no idea how to go about doing this.
How can I find the day in a month using day in a year WITHOUT using an API or imports?.