Telegram Group[16K+] Join Now
Write a C program to Check whether a given year is a leap year or not

Write a C program to Check whether a given year is a leap year or not. – Very Useful

Facebook
WhatsApp
Telegram

Write a C program to Check whether a given year is a leap year or not. Complete information is given to you in this article, so read this article till the end.

जाने इस पोस्ट में क्या क्या है

Write a C program to Check whether a given year is a leap year or not

Hello Friends in this article Complete information is given to you to check given year is a leap year or not. So Read this article till the end.

Write a C program to Check whether a given year is a leap year or not
Write a C program to Check whether a given year is a leap year or not

Here is Code to Check whether a given year is a leap year or not.

Code:

#include<stdio.h>

int main(void)
{
int year;

printf("Please enter the year: ");
scanf("%d",&year);

if ((year%400==0) && (year%100==0) || (year%4==0))
{
printf("This is a leap year");
}
else
{
printf("IS not a leap year");
}
}

Output:

Please enter the year: 2022
IS not a leap year

Leave a Comment

आपका ईमेल पता प्रकाशित नहीं किया जाएगा. आवश्यक फ़ील्ड चिह्नित हैं *

Online Process

Trending Results

Request For Post