Question about Sun Java Programming Language (cdj-275)

# How can i determine the input number of a leap

How can i write the program that determinethe number if the input year is a leap year?

Posted by on

• Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Mentor:

An expert who has written 3 tips or uploaded 2 video tips.

Governor:

An expert whose answer got voted for 20 times.

• Expert

Hello, Just divide the year by 4 and see check the remainder. If the remainder is 0 the year is leap year else it is a non leap year.
Regards, polysandy

Posted on Jul 20, 2010

Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

×

my-video-file.mp4

×

## Related Questions:

### When you are born on leap year does that mean when your birthday comes again you will be 4 years older.

no- 16 as a leap year is every 4 years so if you had a birthday when 12 then 12 + 4 = 16
anyway normal families still celebrate a birthday every year regardless if it is a leap year or not

Jul 15, 2017 | The Computers & Internet

### WHEN was FIRST Leap-Year Recorded?

The National Maritime Museum has your answer: "The first leap year in the modern sense was 1752, when 11 days were 'lost' from the month September with the adoption of the Gregorian calendar by Britain and her colonies. After 1752 we adopted the system still in use today where an additional day is inserted in February in years wholly divisible by 4, other than years ending in 00 with the exception of those divisible by 400 which are still leap years (like 2000). This is certainly not the first use of leap years, the Julian calendar we used before 1752 had a simpler system of leap years, and remember, no calendar is universal."

Mar 07, 2017 | Watches

### Has no leap yr. went from 2/28 to 3/1 cannot coordinate time

• Auto Calendar (pre-programmed until the year 2039)
that means, you need to set up correct year in order to show leap years.... and then it will show you also correct day, after you will set it up correctly..... http://support.casio.com/storage/en/manual/pdf/EN/009/qw1545.pdf

check page 2

Mar 02, 2016 | Casio DW-5600E-1VCT Wrist Watch

### How frequently do non-leap Februaries with only 4 weeks occur ?

We add a Leap Day on February 29, almost every four years. The leap day is an extra, or intercalary, day and we add it to the shortest month of the year, February.
In the Gregorian calendar three criteria must be taken into account to identify leap years:
• The year can be evenly divided by 4;
• If the year can be evenly divided by 100, it is NOT a leap year, unless;
• The year is also evenly divisible by 400. Then it is a leap year.
This means that in the Gregorian calendar, the years 2000 and 2400 are leap years, while 1800, 1900, 2100, 2200, 2300 and 2500 are NOT leap years.

Jan 02, 2018 | The Watches

### Is there any way that I can set my Seiko perpetual calendar watch at home?

What a great watch! It has a super-fine piezo-electronic motor to move the date wheel! Very cool. Its quite a show to go through the date/leap-year check, and then observe the watch catch back up to the correct time afterwards. Battery lasts ~five years.
I downloaded the manual (your model number on watch back) after a short search online (beware of trojans/viruses).
Setting after a battery replacement requires shorting certain pins inside the watch to set the leap-year, and date. The back unscrews, and may require the special watch-wrench, available online. I unscrewed mine VERY CAREFULLY with fine pliers, confirming that I was doing this in a clean, dust-free location. The instructions are quite specific, must be followed carefully to set up correctly. Have a fine wire jumper to set the leap-year. I learned this because I did not want to pay an inexperienced jeweler \$100 to replace the battery.

Oct 13, 2014 | Seiko Watches

### How do you know witch setting to make on the leap year adjustment on the Citizen Calibre 8700 model. +1, +2, +3...?

On Leap Years, the function dial is to be set to '0'.
Add one for each year after...
So, for 2011, set the function dial to '3' since it has been 3 years since 2008, the last leap year. Next year it should move/be set to '0' again since 2012 is a leap year.

Dec 23, 2010 | Citizen Eco-Drive Calibre 8700 Wrist Watch

### Need an expert on the new minute repeater by campanola, sold one at the retail jewelry store i work at, gentleman wants step-by-step hands on instruction as to the minute repeater function as well as the...

in order to set the repeater chime you need to set the watch and the sub watch to the same time.

This watch has comes with crown in position 0 , if you pull it out one level it becomes position 1 and if you pull it out one more time it is position 2 .

There are 3 buttons on the watch also. The button directly above the crown is button A the button below the crown is button B and the button directly across the crown is button C.

To set time you must first pull out crown to position 2 when the small second hand is at 12 o'clock position and it is stopped.

The mode will also at this time go to 0 and the sub watch second hand( the long second hand with the sun on it ) will also go to 0.

At this time you can just move the crown to set the proper time to the main watch . Now if you press the B button to set the sub watch . Each time you press the B button it will advance one minute hold down the B button and will advance time faster.

Do this to set the sub watch time make sure you watch the am and pm to make sure you are getting the proper time of day.

if the sub watch second hand ( the long second hand) is not aligned to 12 oclock then press the A button keep pressing button or hold it down to go faster until it is aligned at the 12 oclock position

Now push crown in back to 0 position for your time for your watch and sub watch should be set.

Set leap year.
Pull crown to position 1
Press the B button to adjust leap year.
the leap year is set by how many years from the previous leap year it has been . So 2008 was the previous leap year so we will h ave to set leap year at year 2 . The hands of the leap year are connected to the month so you must hold down a and b button or just press the b button to get to year 2 .

once you do that your leap year should be set.

to set the Repeater ( this is a beep from the watch to tell you the time with sound) make sure crown is in 0 position and hold a button for a couple of seconds to activate Reapter.

you can press any other button to end the chime .

also to get to leap year view while crown is in 0 position hold down the b button for 2 seconds . Pushes any button to return to normal calendar.

Oct 16, 2010 | Citizen Campanola Perpetual Calendar...

### How do I find out on my watch how far from leap year we are .its acitizen eco-drive

Pull out the crown to position 1 and the second hand moves to the month position while the small dial moves to the years since last leap year position.

If you haven't got a manual to fully understand what the indications mean, go to "citizen.com", click on "Technical Support"amd then on "setting instructions".

Enter the number required off your watch and click on "get setting instructions".

Jan 31, 2010 | Citizen BL5314 52E WR200 Eco-Drive scyba...

### C program

See the Following Program

Leap Years
Def: A year is a century year if it is divisible by 100.
Def: A year is a non-century year if it is not a century year.
Def: A year is a leap year if it is a non-century year that is divisible by 4, or a century year that is divisible by 400. Nothing else is a leap year.
In a source file named leapyears.cpp, write a program that will prompt the user for the starting year and ending year for a range of years and print to the screen all leap years in that range, 5 years per line. You must write a separate function called isLeapYear that takes a year as a parameter and returns whether or not that year is a leap year. Your main function will call the isLeapYear function in a loop for every year within the range delineated by, and including, the starting and ending years.
Help with Code Tags c Syntax (Toggle Plain Text)
1. #include <iostream>
2. using namespace std;
3. bool LeapYear(int y)
4. {
5. return ( y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0);
6. }
7. double isLeapYear(double x)
8. {
9. if( x > -10000 && x < 10000)
10. return x;
11. }
12. int main()
13. {
14. int x;
15. cout << "Please enter start and end of a range of years: ";
16. cin >> x;
17. if (isLeapYear(x))
18. {
19. if (LeapYear(x))
20. cout << x;
21. }
22. }
--------------------------------------------------------------------------------------------------------------------------------------------------
The One More Sample Of the Program

C program to check whether a year is a leap year or not.

Code: C /*
** C program to check whether an entered year is a leap year or not
** @date: 02/12/06
*/

#include<stdio.h>

int main(void)
{
int year;

printf("Enter the year: ");
scanf("%d",&year);

/*
** The logic is that the year is either divisible by both
** 100 and 4 , OR its only divisible by 4 not by hundred
*/

if(year%400 ==0 || (year%100 != 0 && year%4 == 0))
{
printf("Year %d is a leap year",year);
}
else
{
printf("Year %d is not a leap year",year);
}

return 0;
}
If Not Satisfied Just put the Program name in Google and Search

Sep 10, 2008 | Computers & Internet

### Setting the perpetual callender 8700

The year is now 2008 a leap year. You should set the watch to leap year.

Nov 02, 2007 | Citizen 8700 BL8000-54L Wrist Watch

## Open Questions:

#### Related Topics:

710 people viewed this question

Level 3 Expert

Level 3 Expert