1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Bogdan [553]
3 years ago
5

A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac

count for the difference in time, every 4 years, a leap year takes place. A leap year is when a year has 366 days: An extra day, February 29th. The requirements for a given year to be a leap year are: 1) The year must be divisible by 4 2) If the year is a century year (1700, 1800, etc.), the year must be evenly divisible by 400 Some example leap years are 1600, 1712, and 2016. Write a program that takes in a year and determines whether that year is a leap year.
Computers and Technology
2 answers:
katrin [286]3 years ago
6 0

Answer:

i_year=int(input(""))

#check leap year

if((i_year % 4 == 0 and i_year % 100 != 0) or (i_year % 400 == 0)):

  print("{} is a leap year.".format(i_year))

else:

  print("{} is not a leap year.".format(i_year))

Explanation:

GREYUIT [131]3 years ago
4 0

Answer:

import java.util.Scanner;

public class LabProgram {

  public static void main(String[] args) {

      Scanner scnr = new Scanner(System.in);

      int inputYear;

      boolean isLeapYear;

      isLeapYear = false;

      inputYear = scnr.nextInt();

      // If a year is divisible by 400,  then it is a leap year

      if (inputYear % 400 == 0)

          isLeapYear = true;

      // If a year is divisible by 100,  then it is not a leap year

      if (inputYear % 100 == 0)

          isLeapYear = false;

      // If a year is divisible by 4,  then it is a leap year

      if (inputYear % 4 == 0)

          isLeapYear = true;

      if(isLeapYear)

          System.out.println(inputYear + " is a leap year.");

      else

          System.out.println(inputYear + " is not a leap year.");

  }

}

Explanation:

  • Take the year as an input from user and store it to inputYear variable.
  • If the year is a century year, check if the year is divisible by 400 ( the year must be evenly divisible by 400 ),  then set the boolean isLeapYear to true. If a year is divisible by 100,  then set the boolean isLeapYear to false. If a year is divisible by 4,  then set the boolean isLeapYear to true.
  • Check if isLeapYear is true, then print that it is a leap year. Otherwise, print that it is not a leap year.

Output:

1712

1712 is a leap year.

You might be interested in
Ladders are a fundamental piece of equipment on construction sites and employers are expected to ensure that workers follow safe
Ede4ka [16]
That statement is true.

Ladders commonly used to do a couple of construction activities in a higher region of a building or area.
If this equipment is not used properly, it could potentially caused  fatal accidents for the people on the site
6 0
3 years ago
HIGH POINTS!!! <br>List the creation date of each gaming console to exist.​
ANEK [815]

Answer:

Explanation:

The original Xbox: November 15, 2001

The original PS1: December 1, 1994

Xbox 360: November 22, 2005

Ps2: March 4, 2000

Ps3: November 11, 2006

Xbox One: November 22, 2013

Ps4: November 15, 2013

Nintendo Ds: November 21, 2004

Nintendo 3ds: February 26, 2011

Gameboy: April 21, 1989

Nintendo Switch: March 3, 2017

7 0
3 years ago
What are some options available in the Spelling and Grammar Checker in word?
denpristay [2]
Some options are add to dictionary, ignore once, ignore all, autocorrect, change, and change all.
6 0
3 years ago
In which area of the screen can features and functions of Word be accessed?
abruzzese [7]

Answer:

Toolbar

Explanation:

j don't know if you meant that instead of scroll bar, but tool bar is the answer

5 0
2 years ago
Please try and solve this
Genrish500 [490]

Answer:

Many students coming into Woodworking 108 are bewildered by “all those little marks ... Parts of an inch will be referred to in fraction form instead of its decimal equivalent. ... on divisions of 2: 1” 2= ½”. ½” 2= ¼”. ¼” 2= 1/8”. 1/8” 2= 1/16”. 1/16” 2= 1/32” ... way is to realize there are 16/16 in an inch and count back 3 of the 1/16 ...

Explanation:

4 0
3 years ago
Other questions:
  • Damion recently did an update to his computer and added a new video card. After the update, Damion decided that he would like to
    13·1 answer
  • In a word processing program, the ribbon or menus contain the
    12·1 answer
  • What is an apprenticeship
    7·1 answer
  • Write a C# solution for the following problem. Submit your .cs file to this link. Sample output(s) attached. == Create an Employ
    5·1 answer
  • An automated service that consolidates and distributes information from newsgroups, blogs, forums and news websites is called
    11·1 answer
  • I need le help, darn ijourneys
    10·2 answers
  • Write any one method to delete a table in writer​
    11·1 answer
  • Create One print command in LOGO​
    12·1 answer
  • It is important to consider design details when creating an api because: ______________
    14·1 answer
  • What is the purpose of installing updates on your computer?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!