subject

Write a program segment that decides whether a given year is a leap year or not. a year is a leap year if it is divisible by 4, except for the case when it is also divisible by 100 and not by 400 hundred. so, for example, 1999 is not a leap year because it is not divisible by 4; 2000 is a leap year because it is divisible by 4 and although it is divisible by 100, it is also divisible by 400; 1900 however, is not a leap year because it is divisible by 100 and not by 400. finally, 2004 is a leap year because it is divisible by 4 and not by 100. your code should use an int named year for comparisons and print "leap year" if the value in year is a leap year and "not a leap year" if it is not. hint: you will need to use nested if statements in this code!

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:00
11. is the ability to understand how another person is feeling. a. authority b. sympathy c. empathy d. taking a stand
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
What are some examples of what can be changed through options available in the font dialog box? check all that apply. font family italicizing bolding pasting drop shadow cutting character spacing special symbols
Answers: 2
question
Computers and Technology, 24.06.2019 20:00
Which element will you include to present numerical on a slide? a: graph b: text c: flowchart d: shapes
Answers: 1
You know the right answer?
Write a program segment that decides whether a given year is a leap year or not. a year is a leap ye...
Questions
question
Mathematics, 12.02.2021 23:00
question
Mathematics, 12.02.2021 23:00
question
Mathematics, 12.02.2021 23:00
question
Mathematics, 12.02.2021 23:00
question
Mathematics, 12.02.2021 23:00
question
Mathematics, 12.02.2021 23:00
question
Physics, 12.02.2021 23:00
question
Mathematics, 12.02.2021 23:00
question
Mathematics, 12.02.2021 23:00