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
sergey [27]
3 years ago
10

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. Ex: If the input is: 1712 the output is: 1712 - leap year Ex: If the input is: 1913 the output is: 1913 - not a leap year
Computers and Technology
1 answer:
Vikentia [17]3 years ago
3 0

Answer:

input-year taken 2020

2020 is divisible by 2

output- 2020 is a leap year

You might be interested in
int myArray-11,3,-8,30,-2,0,5,7,-100,44); Write a loop statement to display the positive numbers each on a separate line like th
dexar [7]

Answer:

#include <iostream>

using namespace std;

int main()

{

 int myArray[] = {-11,3,-8,30,-2,0,5,7,-100,44};

 int n = sizeof(myArray)/sizeof(myArray[0]);

 for(int i=0;i<n;i++){

     if(myArray[i]>=0){

         cout<<myArray[i]<<endl;

     }

 }

  return 0;

}

Explanation:

First include the library iostream in c++ programming for using the input/output function.

Then, create the main function and define the array with the elements which contain both positive element as well negative elements.

after, use the for loop for traversing the array and inside the loop take the conditional statement for check if element in the array is positive.. if it true then print the element on the screen with separate line.

4 0
3 years ago
Write a method named addCommas that accepts a string representing a number and returns a new string with a comma at every third
pentagon [3]

Answer:

Locale unaware

'{:,}'.format(value) # For Python ≥2.7

f'{value:,}' # For Python ≥3.6

Locale aware

import locale

locale.setlocale(locale.LC_ALL, '') # Use '' for auto, or force e.g. to 'en_US.UTF-8'

'{:n}'.format(value) # For Python ≥2.7

f'{value:n}' # For Python ≥3.6

6 0
3 years ago
Who is responsible for protecting the environment? a. Government b. Employers c. Employees d. Everyone Please select the best an
Veronika [31]

Answer:

A

Explanation:

Hope I helped

7 0
3 years ago
Read 2 more answers
Relational operators allow you to ________ numbers
Sonja [21]

Relational operators allow an end user to <u>compare</u> numbers.

<h3>What are relational operators?</h3>

Relational operators can be defined as a programming language construct which allows an end user to compare both numbers and char values.

Also, it can be used to determine whether one number is less than (<), greater than (>), equal to (=), or not equal to another.

This ultimately implies that, relational operators allow an end user to <u>compare</u> numbers.

Read more on relational operators here: brainly.com/question/14995818

#SPJ1

6 0
2 years ago
Find the value of 1/2 of 1/2​
sveta [45]

Answer:

1/2 of 1/2​ is 1/4 <em>or </em>0.25

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • How to get points on Brainly?<br> List at least two ways if you can.
    10·2 answers
  • Who is involved in helping shape the emotional impact of a film? (Select all that apply.)
    8·2 answers
  • Look at the trend in the US labor force participation rate. If increasing the number of women and men in the labor force can be
    13·1 answer
  • Making sure that your business has something special and distinct to offer is known as?
    12·1 answer
  • You are the administrator for a small company. You need to create a new group for users in the sales department. You need to nam
    14·1 answer
  • Universal Containers requires that all users add at least one Product Option from the Maintenance Feature to a bundle.
    5·1 answer
  • The variables xp and yp have both been declared as pointers to integers, and have been assigned values. Write the code to exchan
    6·1 answer
  • Please help What two Boolean operators can you use to narrow your search results?
    7·1 answer
  • Cute nya diba I like bts army​
    10·1 answer
  • Very few games have any sort of narrative, not even a simple one that involves setting the mood through color, sound, environmen
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!