Advertisement
neron476

2_логические-выражения

Sep 9th, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 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 C_sharp_lineinie_vir_4
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. Console.WriteLine("Input x");
  14. string xAsString = Console.ReadLine();
  15. int x = int.Parse(xAsString);
  16. Console.WriteLine("Input y");
  17. string yAsString = Console.ReadLine();
  18. int y = int.Parse(yAsString);
  19.  
  20.  
  21. // Ввод окончен
  22. if ((x > 0 && y > 0) || (x < 0 && y < 0))
  23. {
  24. Console.WriteLine("These numbers are the coordinates of the points lying in the first or the third coordinate quarter = true");
  25. }
  26. else
  27. Console.WriteLine("These numbers are the coordinates of the points lying in the first or the third coordinate quarter = false");
  28. Console.ReadKey();
  29. }
  30. }
  31. }
  32. //bool statement = ((x > 0 && y > 0) || (x < 0 && y < 0));
  33.  
  34. Console.WriteLine(statement);
  35. Console.ReadKey();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement