The current calendar, called the Gregorian calendar, was introduced in 1582. Every year divisible by four was declared to be a leap year, with the exception of the years ending in 00 (that is those divisible by 100) and not divisible by 400. For instance, the years 1600 and 2000 are leap years, but 1700, 1800, and 1900 are not. Write a program that requests a year as input and states whether it is a leap year. (Test the program on the years 2008, 2009, 1900, and 2000.)

Answers

Answer 1

Solution :

Public Function Is a Leap_Year(Year As_Integer) As Integer

'Dim Tor_F for local variable declaring if value is t/f.

Dim TorF As For Boolean

'Pre conditions: Year > 1581 and Year < 3000

If Year > 1581 And Year <> 1700 Or 1800 Or 1900 Then

IsLeapYear = Year / 4

Else

IsLeapYear = False

TorF = False

End If

End Function


Related Questions

what is the difference between internet and intranet​

Answers

Answer:

The internet is a globally connected networks of computers that enables people to share information and communicate with each other.

An intranet is a local or restricted network that enables people to store, organize and share information within an organization

Your colleague developed a function, which is supposed to reverse an array of integers, e.g., {1, 5, -10, 7, 23} => {23, 7, -10, 5, 1}. Test cases show that the function does not work correctly. Please look at the following code and identify all the troubles. Please specify which part(s) of the code will not work and explain why not.

void ReverseArray(int arr[], size_t elements_no) {
size_t i = 0; int x = 0; for (i = 0; i <= elements_no; i++)
{ x = arr[i]; arr[i] = arr[elements_no - i]; arr[elements_no - i] = x; }

}

Answers

Answer:

The parts of the code which makes the program not to work properly is:

1. for (i = 0; i <= elements_no; i++)

2. arr[i] = arr[elements_no - i];

3. arr[elements_no - i] = x;

The correction of the above lines are:

1. for (i = 0; i <= elements_no/2; i++)

2. arr[i] = arr[elements_no - i-1];

3. arr[elements_no - i-1] = x;

Explanation:

It should be noted that the code end up not reversing the array. This happens because the programmer iterates through all the array elements.

i.e.

1. for (i = 0; i <= elements_no; i++)

This will result in the original array.

To solve this problem, the iteration has to stop at the middle element and the correction is:

1. for (i = 0; i <= elements_no/2; i++)

Also, to swap the individual elements 1 has to be subtracted from each array index. So, the following lines:

2. arr[i] = arr[elements_no - i];

3. arr[elements_no - i] = x;

is corrected to:

2. arr[i] = arr[elements_no - i-1];

3. arr[elements_no - i-1] = x;

See attachment for complete corrections

An algorithm can have an output and an outcome
A) True
B) False

Answers

I believe it’s false 99%sure

A _is a short descriptive label that you assign to webpages, photos,
videos, blog posts, email messages, and other digital content so that it is
easier to locate at a later time. It is also the name for part of a coding
element in HTML. *

Answers

Looks like you already answered your question? It’s the a tag ()

classified Computer by their age​

Answers

Answer:

The answer is below

Explanation:

Classification of computers by age are the following:

First generation from 1940 to 1956. For example, ENIAC using a vacuum tube

Second generation from 1956 to 1963. For example, IBM 7070 using transistor

Third generation from 1964 to 1971. For example, this type of computers use an Integrated circuit

Fourth generation from 1972 to 2010. For example, IBM 5100 using a microprocessor.

Fifth-generation from 2010 to present For example IBM Watson, using Artificial intelligence.

What is the index of 7 in this list?
[5, 6, 10, 7, 3, 2.51]

Answers

The index of 7 is 3.

This is a straightforward technique for creating index numbers. In this, the sum of the prices for various commodities in the current year is divided by the corresponding base year price total, and the result is multiplied by 100. p = the sum of prices for the same commodities in the base year. (in Rs) 0 p (in Rs.) Thus option E is correct.

What are the index of number?

In mathematics, an index (or indexes) is the power or exponent that is added to a number or variable. For instance, the index of 2 in the number 24 is 4. Indexes is the plural form of the word. Constants and variables are concepts found in algebra.

A statistical tool for determining the amount of changes in a group of connected variables is an index number. It is derived from diverging ratios, from which it depicts the overall trend. It is a measurement of the normal change in a group of related variables between two distinct scenarios.

Therefore, 3 is the index of 7 in this list.

Learn more about index here:

https://brainly.com/question/4692093

#SPJ2

set screw compression and indenter are all types of
a. compression couplings.
b. threaded connectors.
C. rain-tight fittings.
D. threadless connecters and couplings.

Answers

nAnswer:

A.

Explanation:

The compression couplings can be defined as a set of screw, compression, and indenter. A compression fitting is a type of coupling used to connect pipes. A compression couplings is used to connect fixtures and tubings.

It contains screw, compression, and indenter. Therefore, option A is correct answer.

Answer:

dude above me capping its threadless connectors stay strong king

Explanation:

PHOTOSHOP IS A GRAPHICS EDITING PROGRAM CREATED WITH IMAGES KNOWN AS________ ​

Answers

Answer:

Adobe

Explanation:

Other Questions
Evaluate the issue of large-scale water transfers in the UK Help&EXPLAINDont use for points or will be reported and Ill take the points back please help for 20 points please help me, please find area round to nearest hundredth 10 sentence paragraph reflect (-6, -7) in the x-axis thanks:) Calculus BC Help - Series6. Let f be the function defined by f(x)=1x2+9.(a) Evaluate the improper integral 3f(x) dx, or show that the integral diverges.(b) Determine whether the series n=3f(n) converges or diverges. State the conditions of the test used for determining convergence or divergence.(c) Determine whether the series n=1(1)n(enf(n))=n=1(1)n(n2+9)en converges absolutely, converges conditionally, or diverges. Write the phrase as an expression. the product of 6 and a number m what does flora and fauna means what does clucked at him like hens mean What is the slope of the line through the points,(-4,2) & (5,-1) who was in paris???? Which expression is equivalent to the measure of angle 4 in the image below? #3c Part 1: What postulate did you make use of to answer parts a and b?1 pointSegment Addition PostulateAngle Addition PostulateCorresponding Angles PostulateRuler Postulate My question is what is 69 x 420?Once upon a time, there was a lovely princess. But she had an enchantment upon her of a fearful sort, which could only be broken by love's first kiss. She was locked away in a castle, guarded by a terrible fire-breathing dragon. Many brave knights had attempted to free her from the dreadful prison, but none prevailed. She waited in the dragon's keep, in the highest room of the tallest tower, for her true love and true love's first kiss." [Laughing] Like that's ever gonna happen.[Paper Rustling, Toilet Flushes]Shrek: What a load of--[Toilet Door slams]Shrek hops out his outhouse and his routine like taking a mud shower and farting in his pool.[ All-Star By Smash Mouth Playing]Steve Harwell: Somebody once told me the world is gonna roll me, I ain't the sharpest tool in the shed. She was lookin' kind of du mb with her finger and her thumb in the shape of an "L" on her forehead. The years start comin', and they don't stop comin', fed to the rules and I hit the ground runnin', didn't make sense not to live for fun. Your brain gets smart but your head gets du mb. So much to do, so much to see, so what's wrong with takin' the backstreets. You'll never know if you don't go, you'll never shine if you don't glow. Hey, now, you're an all-star. Get your game on, go play. Hey, now, you're a rock star. Get the show on, get paid. And all that glitters is gold, only shootin' stars break the mold. It's a cool place, and they say it gets colder, you're bundled up now, but wait till you get older. But the meteor men beg to differ judging by the hole in the satellite picture. The ice we skate is gettin' pretty thin, the water's getting warm so you might as well swim. My world's on fire, how 'bout yours? That's the way I like it and I'll never get bored. Hey, now, you're an all-star. [Shouting]Steve Harwell: Get your game on, go play. Hey, now, you're a rock star. Get the show on, get paid. And all that glitters is gold, only shootin' stars break the mold. [Belches]Villagers: Go! Go![Record Scrating]Steve Harwell: Go. Go. Go. Hey, now, you're an all-star. Get your game on, go play. Hey, now, you're a rock star, get the show on, get paid. And all that glitters is gold, only shootin' stars break the mold. Villagers: Think it's in there? All right! Let's get it!Villager 1: Whoa. Hold on. Do you know what that thing could do to you?Villager 2: Yeah, it'll grind your bones for its bread.Shrek: [Laughs] Yes, well, actually, that would be a giant. Now, ogres-- they're much worse. They'll make a suit from your freshly peeled skin.Villager 3: No!Shrek: They'll shave your liver. Squeeze the jelly from your eyes! Actually, it's quite good on toast.Villager 3: Back! Back, beast! Back! I warn ya![Gasping]Villager 3: Right.[Roaring][Shouting][Roaring][Roaring Continues][Shouting Continues]Shrek: [Whispers] This is the part where you run away.[Gasping]Shrek: [Laughs] [Laughing] And stay out! "Wanted. Fairy tale creatures." [Sighs]Guard 1: All right. This one's full. Take it away![Gasps]Guard 2: Move it along. Come on! Get up!Captain of the Guards: Next!Guard 3: Give me that! Your flying days are over.Captain of the Guards: That's 20 pieces of silver for the witch. Next!Guard 4: Get up!Captain of the Guards: Twenty pieces.Guard 5: Come on![Thudding]Guard 6: Sit down there! Keep quiet!Bear: [Crying] This cage is too small. Explain your answer !! Have a nice day Will give braisnlt 1Read lines 1-4 of the first poem."Hope" is the thing with feathers -That perches in the soul -And sings the tune without the words -And never stops - at all -Which of the following best describes the poet's use of language in this stanza?A. The poet is using a simile to describe a personal experience.B. The poet is using a metaphor to explain a universal feeling.C. The poet is making a comparison to call attention to human frailty.D. The poet is making an allusion to evoke a feeling of appreciation. if 8 out of 40 people over the age 95 are female, how many are male? Help me pls pls pls