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
kakasveta [241]
2 years ago
15

3.26 LAB: Leap Year A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate a

round the sun. To account 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. Ex: If the input is: 1712 the output is: 1712 is a leap year. Ex: If the input is: 1913 the output is: 1913 is not a leap year.
Computers and Technology
2 answers:
Taya2010 [7]2 years ago
6 0

Answer:

// program in C++ to check leap year.

// include header

#include<iostream>

using namespace std;

// main function

int main() {

// variable

  int inp_year ;

  // ask user to enter year

  cout<<"Enter year:";

  // read year

  cin>>inp_year;

  // check year is leap or not

  if (((inp_year % 4 == 0) && (inp_year % 100 != 0)) || (inp_year % 400 == 0))

  // if leap year , print leap year

     cout<<inp_year<<" is a leap year.";

  else

  // print not leap year

     cout<<inp_year<<" is not a leap year.";

  return 0;

}

Explanation:

Read year from user.Then check if year is divisible by 4 and not divisible by 100 or year is divisible by 400 then year is leap year.otherwise year is not  leap year.

Output:

Enter year:1712                                                                                                            

1712 is a leap year.

Lera25 [3.4K]2 years ago
5 0

Answer:

#include <iostream>

using namespace std;

int main() {

  int inputYear;

 cin>>inputYear;

 // check year is leap or not

 if (((inputYear % 4 == 0) && (inputYear % 100 != 0)) || (inputYear % 400 == 0))

 // if leap year , print leap year

    cout<<inputYear<<" - leap year" << endl;

 else

 // print not leap year

    cout<<inputYear<<" - not a leap year" << endl;

 

  /* Type your code here. */

  return 0;

}

Explanation:

You might be interested in
Discuss the role of the concept behind the "Internet of Things (IoT)" in today's digitally connected society.
AlekseyPX

Answer:

IoT Definitions: The term Internet of Things generally refers to scenarios where network connectivity and computing capability extends to objects, sensors and everyday items not normally considered computers, allowing these devices to generate, exchange and consume data with minimal human intervention.

Explanation:

hope that helps

7 0
3 years ago
EXERCISE
nirvana33 [79]

Answer:

1. True

2. True

3. False

4. True

5. True

8 0
2 years ago
Match the design feature or area of expertise with the benefit or increase in usability it offers. 1. standardized placement of
RSB [31]
<span>The match of the design feature or area of expertise with the benefit or increase in usability it offers would be the following:

 1. standardized placement of elements simplify reading and increase the transparency of the interface
2. plain fonts ensures software fulfills its function in an efficient manner that recognizes and solves likely issues of use
3. cultural fluency takes advantage of preexisting customer expectations regarding layout
4. well-structured program logic enables the designer to make appropriate choices in style and tone for the intended end user</span>
3 0
2 years ago
Mario was surprised that the box that was supposed to tell him how many words he used in his document did not appear after the s
Nookie1986 [14]

Answer:

Click the Display tab

Explanation:

Choose the Word count option to make it visible, within the Display tab dropdown

7 0
3 years ago
Read 2 more answers
When you open your word-processing program, it opens in a<br> field<br> menu
stepan [7]
B- menu...... hope this helps
8 0
3 years ago
Read 2 more answers
Other questions:
  • Your bank contacts you asking you to phone a number supplied in the email.What do you?
    13·2 answers
  • A report formatted where the page is taller than it is wide is formatted in ____.
    12·1 answer
  • How can you logout your account and do not want to have this anymore
    12·2 answers
  • A(n) ____ is a user interface that allows users to interact with graphical objects and pointing devices.
    13·1 answer
  • Select the correct answer.
    6·1 answer
  • You are asked to design a system of FP numbers representation (with your own design choices), labeled Custom_FP_48, for which we
    8·1 answer
  • Today when Dylan turned on his computer, he noticed that the monitor was very dim. He could still see the desktop icon and text.
    15·1 answer
  • TWO QUICK QUESTIONS
    12·1 answer
  • Analyze the following code:
    8·1 answer
  • Lucy has to move data from column A to column N in a worksheet. Which keys should she select to move data in the same worksheet?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!