c#逻辑运算符
C#逻辑运算符有三种:逻辑与"&&",逻辑或"||",逻辑非"!"
using System;
class Progarm{
static void Main(){
bool flag=true;
bool myfalse=false;
Console.WriteLine("true && false is {0}",flag&&myfalse);
Console.WriteLine("true && true is {0}",flag&&flag);
Console.WriteLine("false && true is {0}",myfalse&&flag);
Console.WriteLine("false && false is {0}",myfalse&&myfalse);
Console.WriteLine("true || false is {0}",flag||myfalse);
Console.WriteLine("true || true is {0}",flag||flag);
Console.WriteLine("false || true is {0}",myfalse||flag);
Console.WriteLine("false || false is {0}",myfalse||myfalse);
}
}