project 2 print10LeapYears(

PHOTO EMBED

Sun Sep 25 2022 02:47:11 GMT+0000 (Coordinated Universal Time)

Saved by @zaczhuang

void print10LeapYears() {
    // TODO: implement
    cout << endl;
    cout << "Enter year --> " << endl;
    int year;
    cin >> year;
    if (year > 1752){
        int i;
        for ( i = 0; i < 10; i++){
            year = year + 1;
            while (isLeapYear(year) == false){
                year = year + 1;
            }
            cout << "Leap year is " << year << endl;
        }
    } else{
        return;
    }
}
content_copyCOPY