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
Which do web servers host?<br> Websites<br> Networks<br> Firewalls<br> Zones
bixtya [17]

Answer:

Websites

Explanation:

A web server host websites, individuals or corporate websites, this helps us to show our websites in the World Wide Web, there are several companies offers this service, even we can get a free host, but a corporate website or a social media needs a lot of host recourses, these hosts are expensive than other, we could pay a web host monthly or per year.

6 0
3 years ago
What statement best describes operating systems?
arlik [135]

Answer: D) Operating Systems manage the computer's random access memory (RAM)

Explanation:

It's not A because all modern computers use some form of an Operating System.

It's not B because some Operating Systems can cost hundreds of dollars.

While C has some truth to it, it's reversed. Operating Systems are there to manage and allocate system resources, and D is the better choice.

6 0
3 years ago
What are the six critical components of an information system? Select three of the six components, and describe a potential vuln
Blizzard [7]
People, procedures and instructions, data, software, information technology infrastructure, internal controls.
7 0
3 years ago
1. Which of the following are considered CAD powerhouses?
allsm [11]

Answer:

1. D.Autodesk and microstation.

2. D. the creation of a computer model, paricularly for purposes of studying.

3. A.internet delivered through standard household phone lines.

4. C.3-D sculptures used to pray for fertility.

5. C.technology.

Explanation:

8 0
3 years ago
Trevor got home from work and suddenly realized that he needed to edit a certain file stored in the company network's server. ho
gregori [183]

I believe the answer is Virtual Private Network (VPN).

Know this answer is late, but im doing my deed hoping i this can help someone else pass this darn class. Best of Luck to whoever is taking the same course. You can do it if my lazy self can do it! It'll be okay ;)

3 0
3 years ago
Other questions:
  • Your new home has a vacuum system. what kind of computer is controlling it?
    5·1 answer
  • Laser printers are particularly effective for printing _______________.
    6·1 answer
  • what is the total resistance of a series circuit with four resistors in series of 12 16 20 and 24 ohms​
    14·1 answer
  • Which party controlled the White House and politics in the late 1800s, except for Grover
    6·2 answers
  • Is USA TestPrep a test-taking site that won't let you access other windows without kicking you off?
    13·1 answer
  • Write a MATLAB program to accomplish the following: Create two vectors, a and b, where vector a contains all positive integers l
    10·1 answer
  • Write a program whose input is two integers and whose output is the two integers swapped. Ex: If the input is: 38 then the outpu
    11·1 answer
  • Which of the following speeches is an example of a demonstration speech? a. “Who was Abraham Lincoln” b. “The Human Brain and it
    5·1 answer
  • Define a function pyramid_volume with parameters base_length, base_width, and pyramid_height, that returns the volume of a pyram
    6·2 answers
  • How does digital and hybrid computers differ in portability​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!