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: [新聞] 為何綠執政8年不做國會改革?沈伯洋竟扯爆
[問卦] 以天然美人來說 日本女生是亞洲最頂嗎?79
[爆卦] 德國右派在歐盟議會選中大獲全勝80
Re: [問卦] 范琪斐才是那個最匪夷所思的吧!72
[問卦] 如果沒人要當公務員國家是不是就垮了?66
[問卦] 有些人對「閩南」反感嗎?爆
Re: [新聞] 為何綠執政8年不做國會改革?沈伯洋竟扯50
Re: [爆卦] 沈伯洋: 質詢的時間上台就是被質詢44
[問卦] 烏龍派出所裡阿兩的老婆怎麼選?38
[問卦] 新青安會變成台灣版次級房貸嗎44
[問卦] 馬的潮州副站長邏輯真的有問題34
Re: [問卦] 范琪斐才是那個最匪夷所思的吧!28
[問卦] 外勞就外勞,移什麼工?= =23
[問卦] 全世界以核替火 為何台以火替核28
[問卦] 要怎麼監控陸配和陸生?24
Re: [新聞] 劉寶傑開罵沈伯洋 你不是逼人造反嗎?75
[問卦] 淡水河發現鯊魚 台灣人會怎麼做14
Re: [問卦] 有些人對「閩南」反感嗎?26
[問卦] 洛陽怎麼混這麼差?26
[問卦] 找一個遊戲50
Re: [爆卦] 青鳥行動設計師: 被利用和背叛+踢出群組25
[爆卦] 伊斯蘭恐怖份子朝印度教的巴士開槍23
[問卦] 在中國退休有比較好嗎?24
[問卦] 鄉民現在推薦哪些youtube 頻道?22
[問卦] 青鳥跟太陽花 哪一個比較可撥15
[問卦] 桃園機場在國外叫做台北的八卦7
[問卦] Nvidia為什麼不在台灣上市,不愛台灣?!18
[問卦] 副站長帶BB槍在車站內開槍沒違法嗎?30
[問卦] 台灣8+9的比例是不是蠻高的?