Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 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. using ConsoleApp1;
  7.  
  8. namespace ConsoleApp1
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. int a, b, c;
  15. Console.Write("Enter A: ");
  16. a = Int32.Parse(Console.ReadLine());
  17. Console.Write("Enter B: ");
  18. b = Int32.Parse(Console.ReadLine());
  19. Console.Write("Enter C: ");
  20. c = Int32.Parse(Console.ReadLine());
  21.  
  22. // Любая проверка чего-либо может быть выполнена только с помощью условного оператора - if [else]
  23. // Для проверок можно использовать только: <,<=,>,>=,==,!=,! [ &&,|| ]
  24. if((a>0 && b<0 && c<0) || (a < 0 && b > 0 && c < 0) || (a < 0 && b < 0 && c > 0))
  25. {
  26. Console.WriteLine("TRUE");
  27. }
  28. else
  29. {
  30. Console.WriteLine("FALSE");
  31. }
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement