So I have to write a function to determine the number of days that have passed since 1/1/1753 and whatever target year the user inputs. I've already included the algorithm to determine if a year is a leap year or not, but I'm still not sure how to write the loop part of my program.
here's what I have so far: my isLeapYear function and main, which prompts the user for a target year.I don't expect the exact answers, but I do need help understanding how to write a loop and how to include a loop here.Code:bool isLeapYear() { int year; if (year % 400 == 0) return true; else if (year % 100 == 0) return false; else if (year % 4 ==0) return true; else return false; } int main() { int numDays; int year; cout << "Year: " << endl; cin >> year; cout << "Number of days; " << numDays; return numDays; }