Preview:
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;
    }
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter