Sunday 12 April 2020

Program: write a program to display input year is leap year or not

#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf(“enter any year: ”);
scanf(“%d”,&n);
if(n%4==0)
printf(“year is a leap year”);
else
printf(“year is not a leap year”);
getch();
}

No comments:

Post a Comment