Home
Home
Tricks & Tip's
Tutorials
Download
Video Tutorial
Technology
About Us
Contact
Thursday, January 20, 2011
Write a program using conditional operators to determine whether a year entered through the keyboard is a leap year or not.
#include<stdio.h>
main()
{
int year;
printf("Enter a year:");
scanf("%d", &year);
(year%4==0)?(printf("Leap Year")):(printf("Not a Leap Year"));
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment