Advertisement
filin

laba_1_z_1_mk1

Sep 7th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.20 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_1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int q = 1;
  14.             while (q == 1)
  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 (y < Math.Abs(x) || x*x+y*y > 15*15)
  21.                 {
  22.                     Console.WriteLine("нет");
  23.                 }
  24.                 else
  25.                 {
  26.                     if (y == Math.Abs(x) || x * x + y * y == 15 * 15)
  27.                     {
  28.                         Console.WriteLine("на границе");
  29.                     }
  30.                     else
  31.                     {
  32.                         Console.WriteLine("да");
  33.                     }
  34.                 }
  35.  
  36.                 Console.WriteLine("Если хотите продолжить, то введите 1");
  37.                 q = int.Parse(Console.ReadLine());
  38.  
  39.             }
  40.         }
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement