Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Concurrent;
- using System.ComponentModel.DataAnnotations;
- using System.Diagnostics.CodeAnalysis;
- using System.Linq;
- using System.Linq.Expressions;
- using System.Runtime.InteropServices.ComTypes;
- using System.Text;
- using System.Threading;
- namespace HelloWorld
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] arr1 = Console
- .ReadLine()
- .Split()
- .Select(int.Parse)
- .ToArray();
- int[] arr2 = Console
- .ReadLine()
- .Split()
- .Select(int.Parse)
- .ToArray();
- bool isSame = false;
- for (int i = 0; i < arr1.Length; i++)
- {
- if (arr1[i] == arr2[i])
- {
- isSame = true;
- }
- }
- if (isSame)
- {
- Console.WriteLine($"Yes, they are the same: {string.Join(" ", arr1)}");
- }
- else
- {
- Console.WriteLine("No, they are not.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement