I am trying to write a program to determine if a year is a leap year or not. It is driving me nuts, i know nothing about leap years. Here is the question.
"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."
i cant figure out how to even go about it, here is as far as i got with my coding.
Code:Public Class Form1 Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click Dim year, value, value2 As Double year = CDbl(txtYear.Text) value = year / 100 value2 = value / 4 MessageBox.Show(CStr(value2)) End Sub End Class




Reply With Quote