Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace array
- {
- class array
- {
- static void Main(string[] args)
- { Console.WriteLine("enter the length of the first array");
- byte n = byte.Parse(Console.ReadLine());
- byte []array=new byte[n];
- Console.WriteLine("enter index");
- for (byte i = 0; i < n; i++)
- {
- // Console.WriteLine("enter index[{0}]",i);
- array[i]= byte.Parse(Console.ReadLine());
- }
- Console.WriteLine("enter the length of the second array");
- byte n2 = byte.Parse(Console.ReadLine());
- byte[] array2 = new byte[n2];
- Console.WriteLine("enter index");
- for (byte m = 0; m < n2; m++)
- {
- // Console.WriteLine("enter index[{0}]", m);
- array[m] = byte.Parse(Console.ReadLine());
- }
- bool equalArrays = false;
- if (n == n2) {
- for (sbyte index = 0; index < n; index++)
- {
- if (array[index]==array2[index]){
- equalArrays = true;
- Console.WriteLine(equalArrays);
- }
- }
- }
- else
- Console.WriteLine("The arraies are ot equal!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement