csc1253proj02f10

Csc1253proj02f10 - Selection Statements CSc 1253 Project 2 Validating A Date Out 9/11 Due 9/19 by 11:50 PM Learning Objectives • Using

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Selection Statements CSc 1253: Project # 2 Validating A Date Out: 9/11 Due: 9/19 by 11:50 PM Learning Objectives • Using Conditional Statements • Using Logical Connectors • More on Writing Interactive Programs The Gregorian calendar was first introduced in October 1582 in Italy over time it replaced the Julian calendar. The Gregorian calendar is accurate but it needs a day adjustment for every intercalary year. Definition 1. The following rules apply when determining an intercalary or leap year: A. A year that is a multiple of 400 is a leap year. B. A year that is not a multiple of 100, but is a multiple of 4, is a leap year. Determining A Valid Date The following rules will apply when determining whether a given date is a valid date on the Gregorian calendar: 1. year: To simplify calculations, your program should only consider years after 1582. 2. month: Valid months are in the range [1,12]. 3. day: If the value entered for the month is 1, 3, 5, 7, 8, 10 or 12, the value for day must be in the range [1,31]. If the value entered for the month is 4, 6, 9 or 11, the value for day must be in the range [1,30]. If the value entered for the month is 2, the value for day must be in the range [1,29] for leap years and [1,28] for non-leap years....
View Full Document

This note was uploaded on 06/20/2011 for the course CSC 1253 taught by Professor Staff during the Fall '08 term at LSU.

Page1 / 4

Csc1253proj02f10 - Selection Statements CSc 1253 Project 2 Validating A Date Out 9/11 Due 9/19 by 11:50 PM Learning Objectives • Using

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online