subject
Engineering, 14.02.2020 17:12 taylor5384

Write a program that determines if a given year is a leap year. Leap years are those years that are divisible by four, except that century years not divisible by 400 are not leap years. For example, 1960, 1996, and 2000 are leap years, while 1961, 1995, and 1900 are not. Your program should ask the user to enter a year and then determine whether that year is a leap year. Repeat until the user enters 0 for the year. The following is an example program run (the user’s input is underlined).Enter a year: 1960 1960 is a leap year. Hint: Leap year alg. from wiki: if (year is not divisible by 4) then (it is a common year)else if (year is not divisible by 100) then (it is a leap year)else if (year is not divisible by 400) then (it is a common year)else (it is a leap year).

ansver
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 03.07.2019 14:10, cowgyrlup124
Explain the difference laminar and turbulent flow. explain it with the shear stress and the velocity profiles.
Answers: 1
image
Engineering, 03.07.2019 14:10, kayabwaller4589
When at a point two solid phase changes to one solid phase on cooling then it is known as a) eutectoid point b) eutectic point c) peritectic point d) peritectoid point
Answers: 3
image
Engineering, 03.07.2019 15:10, margaret1758
If you were designing a bumper for a car, would you prefer it to exhibit elastic or plastic deformation? why? consider the functions of a bumper in both a minor "fender-bender" and a major collision.
Answers: 1
image
Engineering, 06.07.2019 04:20, nataliastrong3846
Amachine of mass 140 kg is mounted on springs of stiffness 1.4x10° n/m and in parallel witha viscous damper of unknown damping coefficient. the machine is subject to a harmonic excitation of 200sin150t n. the phase angle is measured as 2.58 rad. what is the damping coefficient of the viscous damper?
Answers: 2
You know the right answer?
Write a program that determines if a given year is a leap year. Leap years are those years that are...

Questions in other subjects:

Konu
Biology, 07.04.2021 18:30