Ad Code

Responsive Advertisement

272 - TEX Quotes

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