This blog has been migrated to learn c programming for beginners Write a C program to check if the supplied year is leap year or not. This C program check if the supplied year is leap year or not. C Program source code #include<stdio.h> #include<conio.h> int main() { int y; printf("Enter a year:\n"); scanf("%d",&y); if(y%400==0) { printf("Its a leap year."); } else if(y%100==0) { printf("Its not a leap year,"); } else if(y%4==0) { printf("Its a leap year,"); } else { printf("Its not a leap year,"); } getch(); return(0); } You can Browse related article below for more information and program code related to different math operation. Does above is helpful , Post you views in comment DO NOT MISS OTHER C PROGRAMMING TUTORIAL * indicates required Email Address * C program to check if the supplied year is leap year or not.
Comments
Post a Comment