Write a c pgm for leap year
Answer Posted / kumari rina
#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("\n enter the year");
scanf("%d",&n);
if(n%100==0)
{
if(n%400==0)
{
printf("\n year is leap year");
}
else
{
printf("\n year is not leep year");
}
}
else
{
if(n%4)
{
printf("\n year is leap year");
}
else
{
printf("\nyear is not leap year");
}
}
getch();
}
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
What is the difference between fread and fwrite function?
Explain bitwise shift operators?
Why is C language being considered a middle level language?
What is a macro?
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
Why double pointer is used in c?
Is using exit() the same as using return?
Which programming language is best for getting job 2020?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
What is a buffer in c?
Not all reserved words are written in lowercase. TRUE or FALSE?
What is a volatile keyword in c?
Difference between linking and loading?
What are loops in c?
What is typedf?