Can someone make a code for this please? I just want to know how to remove the dash sign on my output

Using Switch selector, create a program that will ask the user to enter an integer format of his/her birthdate in the following condition:

• The month should not exceed to 12.
• The number of day should not exceed to 31.
• The year must range from 180 to present.

Otherwise, the program should return “Invalid Date!”

After evaluating the program should give the exact equivalent word of the integer month.

Tips: You can also include, conditional and logical operators and if else selector but make sure that switch selector should be used to evaluate the month.

Sample run 1:
Please enter you birthdate (MM-DD-YYYY): 12-12-2000
Your birthdate is December 12, 2000

Sample run 2:
Please enter you birthdate (MM-DD-YYYY): 38-12-2000
Invalid Month

Last edited on
Why do you have a dash sign on your OUTPUT? It's probably the fact that you are reading a minus sign with INPUT that is the problem.

Essentially a duplicate thread:
http://www.cplusplus.com/forum/beginner/260023/#msg1129622
There are solutions for how to read the input there. (Actually, I quite like the one that @Albatross struck through!)
Last edited on
@lastchance sorry I posted the same post today. When I run my output it looks like this:

Please enter your birthdate (MM-DD-YYYY):12-12-2000

Your birthdate is December -12,-2000


I can't remove the dash sign
Last edited on
The fault is in your INPUT method, not your output.
Topic archived. No new replies allowed.