C Program To Check Whether It Is Leap Year Or Common Year (Switch Case) - HelpMeOutAlways

Friday, June 15, 2018

C Program To Check Whether It Is Leap Year Or Common Year (Switch Case)

// 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



switch case example

switch case example

switch case example

No comments:

@way2themes