Advertisement
Anonim_999

KOLOX

Mar 24th, 2023
882
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.07 KB | None | 0 0
  1. using System;
  2.  
  3. namespace zad2Rat
  4. {
  5.     internal class Program
  6.     {
  7.         public static void Main(string[] args)
  8.         {
  9.             int x, y;
  10.  
  11.             Console.Write("Введите X: ");
  12.  
  13.             if (int.TryParse(Console.ReadLine(),out x) == false)
  14.                 Console.WriteLine("Неправильный ввод. Теперь X = 0");
  15.             Console.Write("Введите Y: ");
  16.  
  17.             if (int.TryParse(Console.ReadLine(),out y) == false)
  18.                 Console.WriteLine("Неправильный ввод. Теперь Y = 0");
  19.             if (x == 0 && y == 0)
  20.                 Console.WriteLine("В центре");
  21.             if (x > 0 && y > 0)
  22.                 Console.WriteLine("Первая четверть");
  23.             else if (x < 0 && y > 0)
  24.                 Console.WriteLine("Вторая четверть");
  25.             else if (x < 0 && y < 0)
  26.                 Console.WriteLine("Третья четверть");
  27.             else
  28.                 Console.WriteLine("Четвертая четверть");
  29.         }
  30.     }
  31. }
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement