// C program to check whether it is leap or common year
#include<stdio.h>
main()
{
int year;
printf("Enter Year:\n");
scanf("%d",&year);
switch(num%4==0&&num%100!=0||num%400==0)
{
case 1:
printf("Leap Year");
break;
default:
printf("common year");
}
return 0;
}
Output
Friday, June 15, 2018
C Program To Check Whether It Is Leap Year Or Common Year (Switch Case)
C Programs- Switch Case
Labels:
C Programs,
C Programs- Switch Case
Subscribe to:
Post Comments (Atom)
No comments: