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 15:00
When designing content as part of your content marketing strategy, what does the "think" stage represent in the "see, think, do, care" framework?
Answers: 3
question
Computers and Technology, 24.06.2019 09:30
Retype the statements, correcting the syntax errors. system.out.println("num: " + songnum); system.out.println(int songnum); system.out.println(songnum " songs"); note: these activities may test code with different test values. this activity will perform two tests: the first with songnum = 5, the second with songnum = 9. see how to use zybooks.
Answers: 1
question
Computers and Technology, 24.06.2019 15:50
Subscribe to j p g a m e t u b e on you tube ?
Answers: 2
question
Computers and Technology, 24.06.2019 16:30
You may see the term faq on websites which stands for frequently asked questions this is an example of which type of mnemonic? a) poem b) acronym c) acrostic d) abbreviation ken has dipped many dark chocolate marshmallows (which you remember the metric system distance units in decreasing order: kilometers, hectometer, decameter, centimeter, millimeter) is an example of which type of mnemonic? a) poem b) acronym c) acrostic d) abbreviation !
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, 22.08.2020 20:01
Questions on the website: 13722359