Sign InCreate Account

Upgrade to Pro

Upgrade Now

Coding Workspace

EditorProjectsPractice QuestionsTimed Mock ExamsFlowcharts

PseudoEditor AI

Pseudocode TutorCode GeneratorCode FixerCode Converter
Back to Problems
PreviousNext

Sign in to run tests against edge cases and save your code automatically.

Problem Description

Hard

Valid Date Checker

PROValidation & Checks
Date Validation
Selection & Logic

Write a program that inputs a day, a month and a year (three integers, in that order) and outputs `Valid` if they form a real calendar date, otherwise `Invalid`. Rules: - The year must be 1 or greater and the month must be 1 to 12. - The day must be at least 1 and no more than the number of days in that month. - April, June, September and November have 30 days; February has 28 days, or 29 in a leap year; all other months have 31 days. - A year is a leap year if it is divisible by 400, or divisible by 4 but not by 100. For example, 29 2 2024 is `Valid` but 29 2 1900 is `Invalid`.

Example Input

29 2 2024

Example Output

Valid

Success Rate:

0% (0 passed / 0 attempted)

Code

Draft auto-saved

Test Results

Click "Test Code" to evaluate your code against the tests.

Product

For SchoolsOverviewFeaturesFAQ
PseudoEditor

© 2026 PseudoEditor. All rights reserved.