Write a program to find that the year is leap year or not. | CODE WITH SHARAD

Write a program to find that the year is leap year or not.

Written by Sharad Raj on 13th of March, 2018

BASIC PROGRAMS   C LANGUAGE PROGRAMS

PROGRAM CODE

#include<stdio.h>

#include<conio.h>

void main()

{

int year;

clrscr();

printf(enter the year : );

scanf(%d,&year);

if((year%4==0)&&(year%100!=0)||(year%400==0))

{

printf(%d is a leap year,year);

}

else

{

printf(%d is not a leap year,year);

}

getch();

}


Comments


Contact