Write a c pgm for leap year
Answer Posted / narayan sharma
#include<stdio.h>
#include<conio.h>
void main()
{
int y;
clrscr();
printf("\n\n\t Enter The Year\n\n\t");
scanf("%d",&y);
if (y%100==0)
{
if (y%400==0)
printf("\n\n\t Leep Year\n\n");
else
printf("\n\n\tNot Leep\n\n\t");
}
else
{
if (y%4==0)
printf("\n\n\t Leep Year\n\n\t");
else
printf("\n\n\t Not Leep");
}
getch();
}
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
What are the advantages and disadvantages of pointers?
What are the general description for loop statement and available loop types in c?
what is event driven software and what is procedural driven software?
What is difference between structure and union with example?
What is the scope of static variable in c?
How will you divide two numbers in a MACRO?
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
How many loops are there in c?
Write a program of advanced Fibonacci series.
What is void pointers in c?
What is file in c language?
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
How can I read a binary data file properly?
what does static variable mean?
What is C language ?