Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12.  
  13. Console.Write("Podaj wartość logiczną x(true/false):");
  14. bool x = Convert.ToBoolean(Console.ReadLine());
  15. Console.Write("Podaj wartość logiczną y(true/false):");
  16. bool y = Convert.ToBoolean(Console.ReadLine());
  17. var i = x ? y : false;
  18. var u = x && y;
  19. Console.WriteLine("Wynik wersji z wyrażeniem warunkowym:");
  20. Console.WriteLine(i);
  21. Console.WriteLine("Wynik wersji z koniunkcją:");
  22. Console.WriteLine(u);
  23. Console.ReadKey();
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement