Socialize

Breaking

Saturday, March 14, 2020

write a program in c print year is leap or not leap year using if else?

*/ write a program in c print year is leap or  not leap year /*


program :

#include<stdio.h>
#include<conio.h>
void main()
{
    int no;
    printf("\n Enter the value of no= ");
    scanf("%d",&no);
    if(no%4==0)
    {
        printf("\n %d is Leap year.",no);
    }
    else
    {
        printf("\n %d is not Leap year.",no);
    }
    getch();
}

output :


No comments:

Post a Comment