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 06:00
Pthe price of tickets in a group when a purchased in bulk can be found with the equation c=px+24 were c is the cost, p is the number of people,and x is the price per ticket. what is price of of each ticket if it costs $189 to buy tickets for 15 people ? a $8 b $24c $9d $11 show work
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
How is the number 110 written when expanded out to place values in the base 2 (binary) number system? options: 2 x 4 + 3 x 2 + 4 x 1 1 x 2 + 1 x 2 + 0 x 2 1 x 100 + 1 x 10 + 0 x 1 1 x 4 + 1 x 2 + 0 x 1
Answers: 1
question
Computers and Technology, 23.06.2019 21:40
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings. for each match, add one point to user_score. upon a mismatch, end the game. sample output with inputs: 'rrgbryybgy' 'rrgbbrybgy'
Answers: 3
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
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, 19.04.2021 18:50
question
Mathematics, 19.04.2021 18:50
Questions on the website: 13722363