answersLogoWhite

0

#include
#include
void main()
{
int n;
clrscr();
printf("\nEnter the year:");
scanf("%d",&n);
if((n%400==0)((n%4==0)&&(n%100!=0)))
printf("Leap Year");
else
printf("Not a Leap Year");
getch();
}

output:

Enter the year:2003
Not a Leap Year
Enter the year:1312
Leap Year
Enter the year:1300
Not a Leap Year
Enter the year:1600
Leap Year

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Could you write a assembly language program in tasm To check whether a given number present in a sequence of given memory location containing the string to be checked in 8086?

8086 assembly language program to check wether given number is perfect or not


Lab manual in mca 1st sem from ignou?

write a program in C to check whether a given number is apalindrome or not


To check whether the given number is an Avogadro number or not?

45


Program to check whether the entered number is even or odd?

#include<stdio.h> #include<conio.h> void main() { int n; printf("ENTER NO FOR CHECK........ "); scanf("%d", &n); if(n%2==0) printf("Given No is EVEN"); else printf("Given No is ODD"); getch(); }


How do you calculate sum of digit of a given three digit number in visual basic?

simple program


How can you tell if the product of two fractions will be in simpilist form before you use mulitiplication Use examples?

consider a/b * c/d check whether a/b and c/d are in simplest form. if not make them.. if they are then check whether a/d and c/b are in simple form. if no make them. if they are then the answer is going to be a simple fraction. example 3/8 * 12/5 the given fractions are already in simple form. now check whether 3/5 and 12/8 are in simple form. 12/ 8 is not in simple form. so canceling the multiple 4 12/8 = 3/2 now all fractions are simple therefore now the multiplication becomes 3/2 * 3/5 = 9/10


How can you write a complete fortran program to calculate a simple interest siprt100 given principal rate and time?

Solve simple intress usin fortran


Draw a flow chart to check whether a given number is prime or not?

[object Object]


Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html


Method to check the given number is perfect square?

Simple and easy solution:- http://codepad.org/svhkJpxp


Write an algorithm to check whether the given number is odd or even?

Type your answer here... i think we should first enter 1 number then check it


Is the halting problem a decidable problem?

No, the halting problem is undecidable, meaning there is no algorithm that can determine whether a given program will halt or run forever.