From f65f1fadf4929d914a7416850b09776370b303ca Mon Sep 17 00:00:00 2001 From: Uday Kharatmol <100768172+UdayKharatmol@users.noreply.github.com> Date: Mon, 17 Oct 2022 10:30:53 +0530 Subject: [PATCH] Update Find leap year.c Taking input from user so it make program effective. --- Find leap year.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Find leap year.c b/Find leap year.c index 68c20da..f77ff67 100644 --- a/Find leap year.c +++ b/Find leap year.c @@ -2,12 +2,13 @@ int main() { int year; - year = 2016; + printf("Enter a year: "); + scanf("%d", &year); if (((year % 4 == 0) && (year % 100!= 0)) || (year%400 == 0)) - printf("%d is a leap year", year); + printf("%d is a leap year.", year); else - printf("%d is not a leap year", year); + printf("%d is not a leap year.", year); return 0; }