Created
September 17, 2025 17:08
-
-
Save EJackYang/ef242b2dd53ffd7da839c763e75aa7b1 to your computer and use it in GitHub Desktop.
分享一种很奇怪的switch case写法.....启发点在2013年的AY代码里面学的
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| int main(void){ | |
| char symbol; | |
| scanf("%c",&symbol); | |
| switch (symbol) { | |
| case 'a': case 'A': | |
| printf("Fuck A");break; | |
| case 'b': case 'B': | |
| printf("Fuck B");break; | |
| default: break; | |
| } | |
| return 0; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
当有多个条件都具有同一个输出的情况下,可以用使用这样进行判断操作和输出