Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. const bool a = true;
  2. const bool b = false;
  3.  
  4.  
  5.  
  6. bool logsoucet;
  7. bool logsoucin;
  8. bool neglogsoucin;
  9. bool exclusivor;
  10.  
  11.  
  12. logsoucet = a || b;
  13. logsoucin = a && b;
  14. neglogsoucin = !(a && b);
  15. exclusivor = a ^ b;
  16.  
  17.  
  18. Console.WriteLine("{0} or {1} = {2}", a, b, logsoucet);
  19. Console.WriteLine("{0} and {1} = {2}", a, b, logsoucin);
  20. Console.WriteLine("{0} nand {1} = {2}", a, b, neglogsoucin);
  21. Console.WriteLine("{0} xor {1} = {2}", a, b, exclusivor);
  22. Console.ReadKey();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement