Advertisement
filin

laba_1_z_2_mk2

Sep 7th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.27 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Z_2
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int q1 = 1, q = 1;
  14.             while (q==q1)
  15.             {
  16.                 Console.Write("Введите x: ");
  17.                 double x = double.Parse(Console.ReadLine());
  18.                 Console.Write("Введите y: ");
  19.                 double y = double.Parse(Console.ReadLine());
  20.                 if (x > -15 && y > -15 && x < 0 && y < 0)
  21.                 {
  22.                     Console.WriteLine("нет");
  23.                 }
  24.                 else
  25.                 {
  26.                     if (x==-15 && y<=0 && y>=-15 || x==0 && y <= 0 && y >= -15 || y==-15 && y <= 0 && y >= -15 || y == 0 && x <= 0 && x >= -15)
  27.                     {
  28.                         Console.WriteLine("на границе");
  29.                     }
  30.                     else
  31.                     {
  32.                         Console.WriteLine("да");
  33.                     }
  34.                 }
  35.                 Console.WriteLine("Если хотите продолжить введите 1");
  36.                 q = int.Parse(Console.ReadLine());
  37.             }
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement