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
How can you find the exact size of a data type in c?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
What does stand for?
What is getch?
What is a structure member in c?
When the macros gets expanded?
Is a house a shell structure?
What do you mean by dynamic memory allocation in c?
What is difference between scanf and gets?
Explain what is the difference between a free-standing and a hosted environment?
Are bit fields portable?
Is javascript written in c?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
What is the purpose of macro in C language?
Why we use int main and void main?