// Sample Solution
using System;
namespace LogicalOperators
{
class Program
{
static void Main(string[] args)
{
//Barcelona
bool beach = true;
bool hiking = false;
bool city = true;
bool yourNeeds = beach && city;
bool friendNeeds = beach || hiking;
bool tripDecision = yourNeeds && friendNeeds;
Console.WriteLine(tripDecision);
//Portbou
bool beach2 = true;
bool hiking2 = false;
bool city2 = false;
bool yourNeeds2 = beach2 && city2;
bool friendNeeds2 = beach2 || hiking2;
bool tripDecision2 = yourNeeds2 && friendNeeds2;
Console.WriteLine(tripDecision2);
}
}
}
No comments:
Post a Comment