Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <locale.h>
- #include <string.h>
- #include <Windows.h>
- int main()
- {
- setlocale(LC_ALL, "Russian");
- SetConsoleCP(1251);
- SetConsoleOutputCP(1251);
- char* str1[80] = {"я съел женю"};
- char* str2[80] = {"я съел влада"};
- char* str3[80];
- int i = 0, j = 0, k = 0;
- int temp;
- for (i = 0, k = 0; str1[i] != '\0'; ++i)
- {
- for (j = 0; str2[j] != '\0'; ++j)
- {
- temp = strncmp(str1[i], str2[j], 80);
- if (temp == 0)
- {
- str3[k] = str1[i];
- ++k;
- }
- }
- }
- puts(str3);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement