Write a c pgm for leap year
Answer Posted / rukmanee
#include<stdio.h>
#include<conio.h>
void main()
{
int year;
clrscr();
printf("\n enter a year:");
scanf("%d",&year);
if(year%2==0&&year%100==0&&year%400==0)
{
printf("the given year is a leap year");
}
else
{
printf("the given year is not a leap year :");
}
getch();
}
| Is This Answer Correct ? | 4 Yes | 7 No |
Post New Answer View All Answers
Describe the steps to insert data into a singly linked list.
Is null a keyword in c?
What is the use of clrscr?
What is the main difference between calloc () and malloc ()?
what is the difference between 123 and 0123 in c?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
What is file in c preprocessor?
how to construct a simulator keeping the logical boolean gates in c
What is a sequential access file?
Explain pointer. What are function pointers in C?
What is wrong with this declaration?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
What are identifiers in c?
Is malloc memset faster than calloc?
What is FIFO?