I got a different output!

Revision en3, by Ziad0_0, 2017-04-22 00:30:38

Hi, I am trying to solve 118A - String Task and the output I have in my pc is different than the output in codeforces. My submission:26568938 My code: ~~~~~ #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <string.h> #include <stdio.h> `int main()` `{` ` char str1[101],str2[202];` ` gets(str1);` ` int i,j=1;` ` for(i=0;i<strlen(str1);i++)` ` {` ` str1[i]=tolower(str1[i]);` ` switch (str1[i])` ` {` ` case 'a':` ` case 'o':` ` case 'e':` ` case 'y':` ` case 'i':` ` case 'u':` ` continue;` ` default :` ` {` ` str2[j]=str1[i];` ` j=j+2;` ` }` } } for(j=0;j<strlen(str1)*2;j=j+2) str2[j]='.'; if(isalpha(str2[strlen(str2)-1])) str2[strlen(str2)]='\0'; else str2[strlen(str2)-1]='\0'; printf("%s\n",str2); ` return 0; }` ```` ~~~~~

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English Ziad0_0 2017-04-22 00:31:55 925
en3 English Ziad0_0 2017-04-22 00:30:38 86
en2 English Ziad0_0 2017-04-22 00:29:48 861
en1 English Ziad0_0 2017-04-22 00:24:40 164 Initial revision (published)