# Leap Year

I want to write a C Code where user could give a 4 Digit Year number like :2018 The programm will say if its leap or not leap year. But i want to add another step. Ex: if 2019 is not the leap year the programm shoudl tell me which year is next leap year. #include <stdio.h> int main() { int year; printf("Enter a year: "); scanf("%d", &year); // leap year if perfectly visible by 400 if (year % 400 == 0) { printf("%d is a leap year.", year); } // not a leap year if visible by 100 // but not divisible by 400 else if (year % 100 == 0) { printf("%d is not a leap year.\n", year); } // leap year if not divisible by 100 // but divisible by 4 else if (year % 4 == 0) { printf("%d is a leap year.\n", year); } // all other years are not leap year else { printf("%d is not a leap year.\n", year); } year+=1; printf("%d is the next leap year:\n", year); return 0; }