Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     char first[]  = "5ask*ytr/m";
  6.     char second[] = "a/ym*f5xt";
  7.     char third;
  8.  
  9.     int i, j;
  10.  
  11.     int n = sizeof(first) - 1;
  12.  
  13.     printf("\nПерша послідовність: '%s'\n", first);
  14.     printf("\nДруга послідовність: '%s'\n", second);
  15.     printf("\nЗбіги символів: ");
  16.  
  17.  
  18.     for (i =0; i < n; i++)
  19.     {
  20.         for (j = 0; j < n; j++)
  21.         {
  22.             if (first[i] == second[j])
  23.             {
  24.                 third = first[i];
  25.                 printf("%c", third);
  26.  
  27.             }
  28.         }
  29.  
  30.     }
  31.     printf("\n");
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement