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]
3 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]3 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]3 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
What is the output of the following C++ code?
SVETLANKA909090 [29]

Answer:

Your not including anything in your code.

Explanation:

According to your text all you have is #include. You didn't incldue any directives so you will get a error.

6 0
2 years ago
Is it possible for a PowerPoint user to add notes to slides and see the added comments
Arturiano [62]

Answer:

I am not for sure on this, but yes I think it is possible for the PowerPoint user to add notes to slides and see the added comments. If it isn't possible I know for a fact on Google slides it is possible.

:

hope this helps! :)

7 0
3 years ago
A security system uses sensors at every door and window which will set off an alarm if any one of them is opened. There is also
jeka57 [31]
Well think of it like this lets say this wasn't and security system and it was a video game console and remote.
 Now the console or keypad or the main components the power on or shut off the devices and the remote or sensors are the secondary parts but they are needed to help the console or keypad figure out what they are doing.
5 0
3 years ago
Mention one application of AI from the real world and describe the use of of this application what is the type of learning used
gayaneshka [121]

Answer:

The real world AI application is Google Duplex. It is able to receive orders for making reservations. Then it calls the shop or the place and deals with the person and talks to him very fluently and informs you about the reservation. Some other general types of AI application are Google Assistant, Siri , Amazon Alexa and so on. But google Duplex is lot more advanced than them.

4 0
2 years ago
Point: A Point in a two dimensional plane has an integer x coordinate value and an integer y coordinate value.
UNO [17]

Answer:

They are connected

Explanation:

8 0
2 years ago
Other questions:
  • George borrowed some equipment from his friend for recording his monologue for his art class. He got all the equipment except th
    15·1 answer
  • My computer keeps shutting down I've tried to completely wipe the memory but it didn't work do you have any ideas how to fix it
    7·1 answer
  • The negotiators past relationship will affect current behavior if the parties
    12·1 answer
  • Pressing the e key while in edit mode will exit the interaction mode<br><br> true<br><br> false
    7·1 answer
  • Bulldog Holdings is a U.S.-based consumer electronics company. It owns smaller firms in Japan and Taiwan where most of its cell
    5·1 answer
  • Define Turbo C++ and how is the use of Turbo C++.?
    15·1 answer
  • An alteration threat violates information integrity. <br> a. True <br> b. False
    13·1 answer
  • Keli is unable to find a shape that meets her needs. Which feature in Power Point should she use to create shapes that are compl
    6·1 answer
  • You are considering using Wi-Fi triangulation to track the location of wireless devices within your organization. However, you h
    9·1 answer
  • Which part of the computer is responsible for managing memory allocation for all applications
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!