Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //#include <stdio.h>
- //#include <malloc.h>
- //#include <time.h>
- //#include <stdlib.h>
- //#include <conio.h>
- //#include <math.h>
- //#include <iostream>
- //#include <string.h>
- //int leng;
- ////char* str(char *s1, char *s2, int leng1, int leng2)
- //char* str(char *s1, char *s2, int leng1, int leng2)
- //{
- // char *strret;
- // strret = new char[leng1 + leng2 + 1];
- // int k,l=0;
- // for (int i = 0; i < leng1; i++)
- // {
- // if (s1[i] == s2[0])
- // {
- // k = 0;
- // for (int j = 0; j < leng2; j++)
- // if (s1[i + j] == s2[j])k++;
- // if (k == leng2) i += leng2-1;
- // else {
- // strret[l] = s1[i]; l++;
- // }
- // }
- // else {
- // strret[l] = s1[i]; l++;
- // }
- //
- // }
- // return strret;
- //}
- //int main()
- //{
- // setlocale(LC_ALL, "Russian");
- // int n, m;
- // char *s, *s0, *str1;
- // str1 = new char[256];
- // s = new char[256];
- // s0 = new char[256];
- // char c;
- // c = 'a';
- // printf_s("Введите строку s:");
- // for (n=0; c !='\n';n++)
- // {
- // scanf_s("%c", &c);
- // s[n]=c;
- // }
- // c = 'a';
- // printf_s("Введите строку s0:");
- // for (m = 0; c !='\n'; m++)
- // {
- // scanf_s("%c", &c);
- // s0[m]=c;
- // }
- // m--;
- // str1 = str(s, s0, n, m);
- // printf_s("Итоговая строка: ");
- // for (int i = 0; i < leng; i++)
- // printf_s("%c", str1[i]);
- // _getch();
- // return 0;
- //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement