+ 1
What is the problem with test cases 3 and 5?
You receive a date and need to know what day of the week it is. Task: Create a program that takes in a string containing a date, and outputs the day of the week. Input Format: A string containing a date in either "MM/DD/YYYY" format or "Month Day, Year" format. Output Format: A string containing the day of the week from the provided date. Sample Input: 11/19/2019 Sample Output: Tuesday https://code.sololearn.com/c6oKVWqaOb8N/?ref=app
3 Antworten
+ 1
Nice 👍
Now that you've done it the hard way, also look up the std::chrono header, notably the "weekday" function.
0
The most boring but also hardest to f troubleshoot reason: it's just giving wrong answers. 5/12/1900 returns Thursday, for example, but should be Saturday.
0
Thanks, I decided to solve this problem in another way. It works now.
https://code.sololearn.com/cyqXQh63nJ6v/?ref=app