WAP by using conditional operator to determine whether a year entered through the keyboard is a leap century year or not
void main() { int year; clrscr(); printf("Enter any year"); scanf("%d", &year); (year%4==0)? printf("\n\nIt is a leap year"):printf("\n\nIt is not a leap year"); getch(); }
No comments:
Post a Comment