using System;
namespace Едномерен_масив
{
class Program
{
public static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
int[] a = new int[n];
for(int i = 0; i < n; i++)
a[i] = int.Parse(Console.ReadLine());
int b;
bool equal = true;
for(int i = 0; i < n; i++)
{
b = int.Parse(Console.ReadLine());
if(b != a[i])
equal = false;
}
if(equal)
Console.WriteLine("YES");
else
Console.WriteLine("NO");
Console.WriteLine("\n");
Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);
}
}
}Добромир Глухаров написа:
- Код: Избери целия код
using System;
namespace Едномерен_масив
{
class Program
{
public static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
int[] a = new int[n];
for(int i = 0; i < n; i++)
a[i] = int.Parse(Console.ReadLine());
int b;
bool equal = true;
for(int i = 0; i < n; i++)
{
b = int.Parse(Console.ReadLine());
if(b != a[i])
equal = false;
}
if(equal)
Console.WriteLine("YES");
else
Console.WriteLine("NO");
Console.WriteLine("\n");
Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);
}
}
}
Регистрирани потребители: Google Adsense [Bot], Google [Bot]