Ad Code

Responsive Advertisement

458 - The Decoder

Author: Ismail Hosen

Daffodil International University





Problem link

//Pleaes follow from main function                                                                                         #include<stdio.h>

int main()

{

  int i, count=1;

  char input[1000];

  while(gets(input)){

    for(i=0; input[i]; i++){

      if(input[i]=='\"'){

          if(count)

            printf("\`\`");

          else{

            printf("\'\'");

          }

          count=1-count;

      }else{

        printf("%c", input[i]);

      }

    }

    printf("\n");

  }

}

Post a Comment

0 Comments