C Programming Awareness and Practice
A Student Effort .... By Shshank Singhal Ajmer, Rajasthan, India
Pages
HOME
BASIC
RECURSION
ARRAY
STRINGS
CONVERSIONS
Q. Given year is leap year or not ?
THE OUTPUT WOULD BE
#include<stdio.h>
#include<conio.h>
void main( )
{
clrscr( );
int n;
printf("Enter the year: ");
scanf("%d",&n);
if(n%4==0)
printf("It is a leap year");
else
printf("It is not a leap year");
getch( );
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment