Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Podaj wartość logiczną x(true/false):");
- bool x = Convert.ToBoolean(Console.ReadLine());
- Console.Write("Podaj wartość logiczną y(true/false):");
- bool y = Convert.ToBoolean(Console.ReadLine());
- var i = x ? y : false;
- var u = x && y;
- Console.WriteLine("Wynik wersji z wyrażeniem warunkowym:");
- Console.WriteLine(i);
- Console.WriteLine("Wynik wersji z koniunkcją:");
- Console.WriteLine(u);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement