• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/1

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

1 Cards in this Set

  • Front
  • Back
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 400.

Write a program that requests a year as input and states whether it is a leap year.
Public Class Form1

Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button.Click
'Every year divisible by 4 is a leap year, except years ending in 00 and not divisible by 400.
'Output will by Yes or No
Dim year As Double
year = CDbl(Inputtxt.Text)
If ((year Mod 4) = 0) And (Not (year Mod 100) = 0) Or ((year Mod 400) = 0) Then
outputtxt.Text = "Yes"
Else
outputtxt.Text = "No"
End If
End Sub
End Class