+ 6
Tell my mistake its work on other compiler but not work on solo. This coach questio https://www.sololearn.com/coach/75?ref=app
9 Respuestas
0
Line 63: y[yi++]=s[i+1];
And it should work.
+ 2
It is running. You have some warnings about indentation you should check.
As for the result try September 15, 2000 and see what happens
+ 1
Between the comma and the year there is a space in the input from test cases for the format Month Day, Year
0
I tried but its gave some errors which i don't understood what happened?
its working on others compiler without any errors.
0
For the input
1/2/1991
Output: 2/1 /1991 extra unnecessary space is adding...
For input November 1, 1991
(here you have a space for input after 1)
Output: 1/11/ 199 extra space with last 1 missing..
Hoping you can find other mistakes if any..
0
Anyone can fix it
0
I don't understood
0
First case successful run but other cases are failed
0
If part solved.. Similarly with just 2 more steps you can solve else part easily .. Try.
if (isdigit(s[0]))
{
for (int i=0;i<n;i++) {
if (s[i]=='/'){
k++;
continue; }
switch(k)
{
case 0:
m[mi++]=s[i];break;
case 1:
d[di++]=s[i];break;
case 2:
y[yi++]=s[i];
} }
for(int j=0;j<di;j++)
cout<<d[j];
cout<<"/";
for(int j=0;j<mi;j++)
cout<<m[j];
cout<<"/";
for(int j=0;j<4;j++)
cout<<y[j];
//cout<<"i" <<endl;
}
Hoping you get it else part easily....