+6

Hello to all! Can you help me with one code?

Good day Sololearners! I usually work in C ++ programming language using the Slang compiler. I think that's why Sololearn makes some errors. The following code has the same problem. Please help me, where and how should I change it? The code : https://code.sololearn.com/c1zPzP5EQdJS/?ref=app

25 Answers

New Answer

+2

Thanks much! The code is working!!! https://code.sololearn.com/c1zPzP5EQdJS/?ref=app

+2

+2

https://code.sololearn.com/cCZPf59qPuaR/?ref=app i'll add explanation later because i'm busy now :(

+1

Create a function that takes in a string containing a date that is in US format, and return a string of the same date converted to EU. Input Format: A string that contains a date formatting 11/19/2019 or November 19, 2019. Output Format: A string of the same date but in a different format: 19/11/2019. Sample Input: 7/26/2019 Sample Output: 26/7/2019

0

I will hope. Bcs it is important for me

0

In your code may be problem in printing... Can you say what you mean by m[0], m[1] And d[0],d[1]...?

0

I used cout<<d; and cout<<m; and it didn't work. And then I used d[0] and d[1] for "day".

0

For that if input contains only single word means if 1/1/1991, then it becomes error because there is no d[1] exists... Similarly for m[1] also... Got it...?

0

Yes I know it. I tried for both 1/11 and 11/11. And in my compiler it is worked(outputs the same). Because d[1]='\0';

0

You should not print '\0'. It does not appear but presence will matter in output... So don't print. And also for November 1, 1991 the output 1/11/1991 But you getting 1/11/ 991...

0

You think all bugs there?

0

I mentioned where might going wrong.. Hoping then you can rectify errors after knowing that... Is that not what you wanted? Are you checked with all type cases input?

0

Thanks for your help! I have done many things. Okay, so there must be a mistake. I'll try again.

0

Yea on cheak on, youtube, udu boys

0

can you please explain what are you building exactly, because there's a lot of problems

0

I want to solve the problem in Sololearn "Convert Us date to Eu date"

0

problem description please?

0

https://www.sololearn.com/coach/75?ref=app

0

0

idk c++ but it says the problem is in indentation some space problem maybe