由买买提看人间百态

topics

全部话题 - 话题: can2
1 (共1页)
G***G
发帖数: 16778
1
来自主题: Programming版 - 请问4个开关的条件怎么用switch case
四个开关
Can1,Can2, Can3,Can4
1)条件是Can1,Can2,Can3, Can4都是1的时候,执行A
2)条件是这四个有且只有3个是1的时候,
执行B1(对应Can1, can2,can3)
执行B2 (对应Can1,Can2, Can4)
.....
执行B4 (对应Can2, can3,can4)
3)条件是四个中有且只有2个是1的时候
执行C1 (can1, can2)
执行C2 (can1, can3)
...
执行C6 (can3, can4)
4)只有一个是1的时候
执行D1 (can1)
...
执行D4 (can4)
我的问题是,用if else 嵌套好,还是用switch case好?switch case怎么写这个算法?
谢谢!
j**4
发帖数: 10425
2
haha. nao3 can2 de ren2, zui4 ai4 shuo1 bie2 ren2 nao3 can2
A**4
发帖数: 2165
3
来自主题: Military版 - 毛时代的新疆西藏太平吗??
Te4 Nao1 Can2 (tnc)
h**********r
发帖数: 2284
4
来自主题: Automobile版 - 看 RDX <-RAV4 <-MDX 车祸有感
Nao3 Can2.
d********y
发帖数: 2114
5
来自主题: Parenting版 - 养蚕采叶吃mulberry
蚕can2
几年前养过几只。专门买了颗桑椹。
50只太多了。
c**p
发帖数: 1443
6
来自主题: Missouri版 - 有人有兴趣HIKING吗?
hehe, Nao3 Can2
c**p
发帖数: 1443
7
来自主题: Missouri版 - 谁用过floor sander吗?
NC is Nao3 Can2
j**4
发帖数: 10425
8
nao3 can2? i think these are pretty decent, ni3 bu4 yi1 ding4 you3 zhe4 me
gao1 de zhi4 shang1
b**********2
发帖数: 1923
9
来自主题: NewYork版 - kingcw
how nao3 can2 do u have to be to be LOLing at everything? are u like a 15
year old high school girl chatting online??
oops, i forgot u are a member of the 15 year old high school girl clique...
T********e
发帖数: 8631
10
来自主题: NewYork版 - 周六晚上没活动,好悲催啊
还真有sunset hike呢。But扭腰的这帮lao3 rou4 bing4 can2,已经suggest要watch爬
山的片子instead啦。
j**4
发帖数: 10425
11
来自主题: NewYork版 - 带着俺的兰花一起奔 (转载)
have absolutely no idea. i only have one wife from mitbbs, working2009. u
called her nao3 can2?
j**4
发帖数: 10425
12
actually, i think everything is nao3 can2...
take the stupid fucking opera for example. it's considered "high class", but
the opera played at MET last night, when it boils down to it, is just like
wife swap, or real housewives... it's just dressed in a "high class"
costume...
c*s
发帖数: 2145
n******e
发帖数: 708
14
来自主题: Soccer版 - I saw Bierhoff in German coat seat..
Still very handsome.. didn't can2
s**d
发帖数: 787
15
lao you ji? is that what they call "Friends" in chinese? at first it thought
it was a chinese classic or something. i know there is a book called lao3
can2 you2 ji4.
z*****n
发帖数: 7639
16
来自主题: Joke版 - 有武汉人么?
你是说 can2 bo2?
N******t
发帖数: 16051
17
来自主题: pets版 - LA地区那里能买到蚕子么?
上次有人发了这个网站:
http://www.mulberryfarms.com/
原来 蚕 不念chan2, 念can2 的么???@@
d*******t
发帖数: 154
18
来自主题: pets版 - LA地区那里能买到蚕子么?
另外,当然是can2了,哈哈哈,你是南方人?
N******t
发帖数: 16051
19
来自主题: pets版 - LA地区那里能买到蚕子么?

我不是 >< 我 c ch 分得很清的!!就是我从小一直念chan2的啊,从木有听过can2 @@
肿么会这样。。。
x********u
发帖数: 15396
20
来自主题: pets版 - LA地区那里能买到蚕子么?
chan2 蝉
can2 蚕

@@
m***t
发帖数: 4509
21
来自主题: XJTU版 - 7200
zi4 can2
偶的意思坎的是胳膊腿儿什么的。
s********g
发帖数: 92
22
来自主题: Programming版 - 请问4个开关的条件怎么用switch case
unsigned char sw=can4<<3 | can3<<2 | can2<<1 | can1;
switch(sw){
case 1:
//operation D1
break;
case 2:
//operation D2
break;
...
case 13:
//operation B2
break;
case 14:
//operation B1
break;
case 15:
//operation A
}
b*****e
发帖数: 1193
23
can2.0B仅仅是定义datalink layer,很简单
更复杂的应用和功能都在高层协议定义,如1939,15765,canopen等等。
“I was waiting for your reply, actually. I knew you are good at this”
莫非你知道我是谁?
1 (共1页)