Re: [問卦] 用if else敘述反對死刑但這個必須死
※ 引述《pchion2002 (阿我就怕被罵阿)》之銘言:
: 各位大師下午好
: 昨天兩名警察領了盒飯
: 造就了有金句產生
: 從程式語言來看下面這句話
: 「我反對死刑但這一定要判死」
: 判斷式要怎麼寫才能成立?
//judges do not sentence people to death
bool death_sentence = False;
//assume that no policemen die
bool kill_policemen = False;
//if no policemen die, the judge would say the following
while(!death_sentence){
printf("judge: be a good person, you shall be pardoned");
//if a policeman dies, the judge will stop pardoning people
//and sentence people to death
if(kill_policemen == True){
printf("May God have mercy upon your soul,
because I won't!");
death_sentence = True;
break;
}
}
--
少分號啦
要include 抗中保台.h還是人權.h
不對吧 你這樣寫變成所有殺警都判死
[error]expected ';' at row 15.
改好了推回來 另外忘記把殺警判斷放
在#ifdef political_scandal_h 判斷
裡面 前面有沒有這個定義compile出來
會差很多
怕你尷尬,幫你推一下,不忍看幾個程式
猿取暖自嗨
7
首Po各位大師下午好 昨天兩名警察領了盒飯 造就了有金句產生 從程式語言來看下面這句話 「我反對死刑但這一定要判死」1
while(有選票) { 廢死; 執行社會安全網; }2
我覺得這個不是if else的關係 應該只是轉型的問題: //原本是反對死刑的宣告 反對死刑 me; //這一定要判死,要轉型X
首Po需求不難 但這應該是要用例外處理才對。 原本想說是不是只有警察適用,但想了一下, 被殺害的對象如果是一般老百姓,才會被說放下仇恨吧? 所以只要今天被殺死的對象是老百姓以外的,應該都要被砰砰 private val isOpposedOfTheDeathPenalty = true
爆
[外絮] 溜馬新秀:很多人說LBJ很強,但他必須展示溜馬六號新秀Mathurin:很多人說LBJ很強,但他必須展示他比我強 It is safe to say Indiana Pacers rookie Bennedict Mathurin is not lacking in con fidence. Just look at his comment about LeBron James, basically saying he wants to see if the talks about the Los Angeles Lakers star is true. 可以肯定的說,溜馬新秀Bennedict Mathurin並不缺乏信心。看看他對LBJ的評論,基本上爆
[花邊] Zion:受傷的低潮期就像是佐助叛離村子Throughout the design process, Williamson and the teams at Jordan and VIZ爆
[外絮] 老巴:KD必須像LBJ或Kobe那樣率隊奪冠,老巴:KD必須像LBJ或Kobe那樣率隊奪冠,抱團奪冠不算數 “You know it has an effect on his legacy,” said Barkley, who was promoting his upcoming appearance at the American City Golf Championship at Tahoe. “If you g o back and look, and I talked about it on the [TNT] show, LeBron has said it bef ore — he said, ‘I had to win a championship without Dwyane Wade and Chris Bosh爆
[花邊] 小李:想留隊,但我不反對被交易Talking with Jabari Young of CNBC, Dame made it clear that he won't say no if th e team wants to trade him, but he doesn't think that's a likely scenario. 在接受CNBC記者Jabari Young的採訪時,小李明確表示,如果球隊想要交易他,他不會拒絕 ,但他認為這種情況不太可能發生。 In an interview with CNBC's Jabari Young, Lillard said: "I have no plans of not爆
[花邊] Lillard:威少球風改變是因為無法一球Lillard:威少球風改變是因為無法一球在手,這是很大的調整 Westbrook's career and legacy is undeniable. That's just the bottom line. The pl ayer, the career he's had what he's accomplished, the things he's done, nobody e lse has been able to do it. Like with all these triple doubles, I don't care if you stat chasing or whatever people want to say. If I try to go every game and g爆
[外絮] 哈登:我不會花時間在網路上與人唇槍舌哈登:我不會花時間在網路上與人唇槍舌劍,這都是浪費時間 I’m going back to the “celebrities, they’re just like us” sentiment, because if you cut him, Harden will bleed. He is one of the rare athletes who puts it a ll out there without putting anything personal out there. And with good reason, given that the media and those ever-present keyboard warriors haven’t always be68
[情報] Djokovic談不能打美網:我不懂這邏輯‘I don’t see the logic’ – Djokovic weighs in on rules preventing him fromp laying US Open “No unvaccinated people can enter the USA as of this moment,” said the 35-ye ar-old. “I did hear unofficially that some people got away with it, some peop56
[情報] KD:Embiid值得一座MVP文章很長 只節錄其中幾段訪問 Kevin Durant said Joel Embiid deserves the MVP. He’s doubtful he’ll win it, though, because the Sixers center is not as likable as the two other leading candidates. KD認為Embiid值得一座MVP。即便他認為不會發生因為鉛筆不像另外兩位候選人(Jokic、Giannis)一樣”被喜歡”。 “There’s a lot of players that’s been controlled by their narrative,” Durant said. “Some of it has been because of the player and some of it has been about the perception other people have about that player. In Joel’s case, more people just like Giannis (Antetokounmpo) and (Nikola) Jokic.1
[問卦] Do you hear the people sing?Do you hear the people sing? Singing a song of angry men? It is the music of a people Who will not be slaves again When the beating of your heart
爆
Re: [問卦] 亡國感越來越重爆
Re: [問卦] 亡國感越來越重70
[爆卦] 517新太陽花輪椅女孩澄清爆
[爆卦] 伊朗總統與外交部長身亡78
[問卦] 為啥8年後連法官都在做詐騙?51
[問卦] 現在買房,以後繳不起就賣,反正賺的心態52
[問卦] 台股為什麼翻黑了?47
[問卦] 今天新老闆上任,送匾額要刻什麼字96
[問卦] 狂新聞背後是不是有阿共的資金?不用查48
[問卦] 新領導開口第一句話說什麼可以震驚全場?37
Re: [新聞] 摔到腦震盪怒斥「殺人未遂」沈伯洋要告了44
[問卦] 網軍從今天開始要被下架了嗎?41
[問卦] 這8年學到了什麼成語?34
[問卦] 辜莞允(33C)夏筠婷(32E)大家選誰?37
[問卦] 李嘉誠在香港樓房打七折出售34
[問卦] 台灣為啥又要亡國了?37
[地震] 地震28
[問卦] 小草和魯蛇差在哪?33
[爆卦] 伊朗總統墜機地點無發現生還者27
[問卦] 為什麼要酸小草?28
[問卦] 有沒有不知道法案,卻提修正最後還通過28
Re: [問卦] 亡國感越來越重34
[問卦] 亡國感越來越重26
[問卦] 匯款不能自己跳戶名嗎27
[問卦] 新的大統領有甚麼超能力?24
[問卦] 新青安買的 租人會怎樣?23
Re: [問卦] 大家知道詐騙很嚴重,但其實擋不了吧25
[問卦] 慟! 金塊隊被淘汰21
[問卦] 幹你娘 德不配位26
[問卦] 你們會嚴格控管糖量攝取嗎