Earn while u Learn

Tips tweaks hacks on computer with C C++ VB tutorials and ways to earn money online

ad

To check a year is leap year or not

This code will create a program to check if a year is leap year or not.
Code:
__________________________________________________________

#include(stdio.h)
#include(conio.h)
main()
{
int year,leap;
printf("\tEnter a year Ex. 1990\n");
scanf("%d",&year);
if(a%4==0)
{
printf("%d is a leap year\n",year);
}
else
{
printf("%d is not a leap year",year);
}
getch();
}
 __________________________________________________________

0 comments:

Sign in / Join

Labels