#純靠北工程師3z2
----------
今天教各位如何用C++寫忍者code(閏年判斷為例)
正常人︰
```
int year = 2020;//year:今年
if(
(
year % 4 == 0
&& year % 100 != 0
) ||
year % 400 == 0
)//分支
cout << "Yes"; //成立
else cout << "No";//不成立
```
忍者︰
```
const char* _[2] = {"No","Yes"};
int __nj_ = 2020;
std::cout << _[!(__nj_&3)&&__nj_%25||!(__nj_&15)];
```
各位想當忍者嗎?
----------
🗳️ [群眾審核] https://kaobei.engineer/cards/review
👉 [GitHub Repo] https://github.com/init-engineer/init.engineer
📢 [匿名發文] https://kaobei.engineer/cards/create
🥙 [全平台留言] https://kaobei.engineer/cards/show/5150
Search
閏年判斷c++ 在 C++(switch语句){ 习题讲解(1055:判断闰年);} - YouTube 的八卦
C ++(switch语句){ 习题讲解(1055: 判断闰年 );} 觉得有收获就来一波关注、收藏和分享吧~您的支持是我持续更新的动力! ... <看更多>