C program to print all Leap Year from 1 to N April 13, 2021 To Print all Leap Year From 1 to Given Year/*C program to print all leap years from 1 to N.*/ #include <stdio.h> //function to check leap yearint checkLeapYear(int year){ if( (year % 400==0)||(year%4==0 && year%100!=0) ) return 1; else return 0;} int main(){ int i,n; printf("Enter the value of N: "); scanf("%d",&n); printf("Leap years from 1 to %d:\n",n); for(i=1;i<=n;i++) { if(checkLeapYear(i)) printf("%d\t",i); } return 0;}-----------------------------------------------------------Output Tweet Share Share Share Share About Code2Chef Computer Hardware or Software does nothing without a computer program guiding. Related Post C program to check whether number is Perfect Square or not Given a Number is Perfect Square or Not/*C program to check number is perfect square or not.*Program To Check Whether Number Is Palindrome Or Not Given Number is Palindrome or Not /* C program to check whether C program to convert number from Binary to Decimal Number A Given Binary Number to Decimal Number /* C program to convert the given binary number C program to convert number from Decimal to Binary Convert Given Decimal Number to Binary Number/*C program to convert number from decimal to bi
ConversionConversion EmoticonEmoticon