Abdula_2314124

Untitled

Mar 17th, 2024
814
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.51 KB | None | 0 0
  1. using System;
  2.  
  3. namespace MasREpeat
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //int[] marks2 = { 12, 3, 5, 600, 989 };
  10.  
  11.             //for (int i = 0; i < marks2.Length; i++)
  12.             //{
  13.             //    Console.WriteLine(marks2[i]);
  14.             //}
  15.  
  16.             //string[] names = { "Am", "Andrii", "Ome" };
  17.             //for (int i = 0; i < names.Length; i++)
  18.             //{
  19.             //    //var index = Array.IndexOf(names, currentName);
  20.  
  21.             //    //if (index == -1)
  22.             //    //{
  23.             //    //    Console.WriteLine("Тебе не має");
  24.             //    //    break;
  25.             //    //}
  26.             //}
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.             int[,] grid = new int[5, 5];
  35.             int currentPointW = int.Parse(Console.ReadLine());
  36.             int currentPointH = int.Parse(Console.ReadLine());
  37.             for (int i = 0; i < grid.GetLength(0); i++)
  38.             {
  39.                 for (int j = 0; j < grid.GetLength(1); j++)
  40.                 {
  41.                     if(i == 4 && j == 2)
  42.                     {
  43.                         if(currentPointH == 2 && currentPointW == 4)
  44.                         {
  45.                             Console.WriteLine("Попав");
  46.                         }
  47.                         else
  48.                         {
  49.                             Console.WriteLine("не попав");
  50.                         }
  51.                     }  
  52.                 }
  53.             }
  54.  
  55.  
  56.  
  57.  
  58.         }
  59.     }
  60. }
  61.  
Advertisement
Add Comment
Please, Sign In to add comment