Wednesday, 28 August 2013

Write a program using conditional operators to determine whether a year entered through the keyboard is a leap year or not.

#include<stdio.h>
void main()
{
int n;
printf("enter a year");
scanf("%d",&n);
n%4?printf("not leap year"):printf("leap year");
}

No comments:

Post a Comment