Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _02CommonElements
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] first = Console.ReadLine().Split();
- string[] second = Console.ReadLine().Split();
- for (int i = 0; i < second.Length; i++)
- {
- for (int j = 0; j < first.Length; j++)
- {
- if (second[i] == first[j])
- {
- Console.Write(second[i] + " ");
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement