Skip to main content

Posts

Showing posts with the label 18. Write a C program to check whether a year is leap year or not.

ads1

18. Write a C program to check whether a year is leap year or not.

18 . Write a C program to check whether a year is leap year or not. Solution :-  #include<stdio.h> #include<conio.h> void main() {     clrscr();     int a;     printf("Enter the Year :- ");     scanf("%d",&a);     if(a%4==0)     {         printf("%d is the Leap Year");     }     else     {         printf("%d is not a Leap Year");     } getch(); } Output :-         

ads2