当前位置:网站首页>Consolidate -c operator
Consolidate -c operator
2022-07-01 11:58:00 【Jinan medical applet champion】
Foundation entry consolidation
#region Operator 071 The arithmetic Relationship Logic
// The arithmetic
int suan = 1;
int suan2 = 2;
int suan3 = suan + suan2;
Console.WriteLine(" Operator arithmetic operator addition calculation :{0}",suan3);
// Comparison operator == > <
// == Indicates that the results of the operation of the expressions on both sides are equal , Notice that there are two equal signs .
// such as 10 % 2 It's an expression . 0 Alone is an expression , Although only a number .
Console.WriteLine("10 Is it an even number ?!:"+ (10 % 2 ==0));
// For example, design 1 Expression . 5 Start divination at the third day of August in Xinsi year , The specific divination is as follows : The method of divination : number of years + Monthly number + days , Its sum is divided by eight , Mod , Divide by eight . Ren Yin Nian 3 Earth branch numbers , Lunar calendar 6 month , Digital 6, The third day of June .
// 3+6+3=12 % 8 = The result is false, How can I serve true?
Console.WriteLine(" Residual calculation results :"+(12 % 8 ==0.96));
// Logical operators
//【 example 2】 Judge 2017 Whether the year is a leap year .
// According to the title requirements , The judgment of leap year needs to meet one of two conditions , One is that the year can be 4 Integer but cannot be 100 Integers , One is that it can be 400 to be divisible by . The code is as follows .
Console.WriteLine(" Judge 2017 Whether the year is a leap year ?:"+((2017 % 4 ==0 && 2017 % 100 !=0 ) || (2017 % 400 ==0)));
Console.WriteLine(" Judge 2018 Whether the year is a leap year ?:" + ((2018 % 4 == 0 && 2018 % 100 != 0) || (2018 % 400 == 0)));
#endregioneffect

边栏推荐
- The developer said, "this doesn't need to be tested, just return to the normal process". What about the testers?
- The Missing Semester
- CPI tutorial - asynchronous interface creation and use
- GID:旷视提出全方位的检测模型知识蒸馏 | CVPR 2021
- 2022/6/29学习总结
- The Missing Semester
- I'm in Zhongshan. Where is a better place to open an account? Is it actually safe to open an account online?
- Interpretation of R & D effectiveness measurement framework
- 博途V15添加GSD文件
- Redis configuration environment variables
猜你喜欢

使用set_handler过滤掉特定的SystemC Wraning &Error Message

S7-1500plc simulation

Mechanism and type of CPU context switch

NOV Schedule for . Net to display and organize appointments and recurring events

研发效能度量框架解读

Redis configuration environment variables

Adjacency matrix undirected graph (I) - basic concepts and C language

如何看懂开发的查询语句

2022/6/28学习总结

CAD如何设置标注小数位
随机推荐
Comment Nike a - t - il dominé la première place toute l'année? Voici les derniers résultats financiers.
redis中value/String
邻接矩阵无向图(一) - 基本概念与C语言
Force button homepage introduction animation
Istio, ebpf and rsocket Broker: in depth study of service grid
Acly and metabolic diseases
Value/sortedset in redis
TMUX usage
Use set_ Handler filters out specific SystemC wrapping & error messages
Activity workflow engine
Exposure: a white box photo post processing framework reading notes
自组织是管理者和成员的双向奔赴
Summary of JFrame knowledge points 1
Extended tree (I) - concept and C implementation
2022/6/28学习总结
Sum of factor numbers of interval product -- prefix sum idea + fixed one shift two
强大、好用、适合程序员/软件开发者的专业编辑器/笔记软件综合评测和全面推荐
Seckill system 03 - redis cache and distributed lock
Matrix of numpy
On recursion and Fibonacci sequence