How to use string.substr() function?

后端 未结 7 491
夕颜
夕颜 2020-11-29 06:40

I want to make a program that will read some number in string format and output it like this: if the number is 12345 it should then output 12 23 34 45 . I tried using the su

7条回答
  •  一生所求
    2020-11-29 06:57

    You can get the above output using following code in c

    #include
    #include
    #include
    int main()
    {
      char *str;
      clrscr();
      printf("\n Enter the string");
      gets(str);
      for(int i=0;i

提交回复
热议问题