1.关系运算符

包含:>   <   <=  >=   ==  !=

以及bool类型中的true和false。

2.逻辑运算符

与 &&

或 ||

非 !

注意:

逻辑运算符的两边放的一般都是关系表达式或者bool类型的值

3.复合运算符

+=  -= *= /=

另外:扩充延伸.......

判断是否为闰年?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; namespace 第四天_关系运算符和逻辑运算符
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入要判断的年份:");
int year = Convert.ToInt32(Console.ReadLine());
//进行判断能被400或能被4但不能被100整除
bool b = (year % ==) || (year%==&&year%!=);
Console.WriteLine(b);
Console.ReadKey();
}
}
}

最新文章

  1. python serial 获取所有的串口名称
  2. 流的文件操作(File)
  3. [原创]WKWebview点击图片查看大图
  4. 连接linux数据库Oracle时报错ORA-12541: TNS: 无监听程序
  5. 初识ASP.NET CORE:一、HTTP pipeline
  6. js最新手机号码、电话号码正则表达式
  7. 50款免费名片设计模板 PSD 源文件下载《上篇》
  8. [HDOJ5542]The Battle of Chibi(DP,树状数组)
  9. Element can be click when out of view
  10. 2_1我的第一个应用hello world[wp8特色开发与编程技巧]
  11. 在安卓开发中使用SQLite数据库操作实例
  12. 使用JAVA与SmartFoxServer来实现游戏服务器概述
  13. 【图文详解】HDFS基本原理
  14. 关于Random(47)与randon.nextInt(100)的区别
  15. 聚焦“云开发圆桌论坛”,大前端Serverless大佬们释放了这些讯号!
  16. android---EventBus的简单使用(一)
  17. Git基本原理-hash算法
  18. php生成红包
  19. 【Tomcat】详解tomcat的连接数与线程池
  20. 【转】Python中的运算符

热门文章

  1. RocketMQ中PullConsumer的启动源码分析
  2. XAMPP/LAMPP到底在哪里启用APACHE2的rewrite
  3. 物流运输trans「ZJOI2006」
  4. (二)c#Winform自定义控件-按钮
  5. ArrayList用法整理
  6. 自定义genericUDF demo
  7. 2019年 iPad无法充电
  8. CSU1784
  9. Sherlock之Instructions指令介绍(Sherlock Version: 7.2.5.1 64-bit)
  10. vmware上安装的ubuntu连接不上网络