Write a program named CheckMonth2 that prompts a user to enter a birth month and day. Display an error message that says Invalid date if the month is invalid (not 1 through 12) or the day is invalid for the month (for example, not between 1 and 31 for January or between 1 and 29 for February). If the month and day are valid, display them with a message. For example, if the month entered is 2, and the day entered is 17, the output should be 2/17 is a valid birthday.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter4: Making Decisions
Section: Chapter Questions
Problem 5E: a. Write a program named CheckMonth that prompts a user to enter a birth month. If the value entered...
icon
Related questions
icon
Concept explainers
Question
How do I do this? C#
Write a program named CheckMonth2 that prompts a user to
enter a birth month and day.
Display an error message that says Invalid date if the month is
invalid (not 1 through 12) or the day is invalid for the month (for
example, not between 1 and 31 for January or between 1 and
29 for February).
If the month and day are valid, display them with a message. For
example, if the month entered is 2, and the day entered is 17,
the output should be 2/17 is a valid birthday.
Transcribed Image Text:Write a program named CheckMonth2 that prompts a user to enter a birth month and day. Display an error message that says Invalid date if the month is invalid (not 1 through 12) or the day is invalid for the month (for example, not between 1 and 31 for January or between 1 and 29 for February). If the month and day are valid, display them with a message. For example, if the month entered is 2, and the day entered is 17, the output should be 2/17 is a valid birthday.
1 using System;
2 using static System. Console;
3 class CheckMonth2
static void Main()
// Write your main here
Transcribed Image Text:1 using System; 2 using static System. Console; 3 class CheckMonth2 static void Main() // Write your main here
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT