Re: [問卦] 用if else敘述反對死刑但這個必須死

看板Gossiping作者 (Noble Wolf)時間1年前 (2022/08/23 13:38), 1年前編輯推噓1(217)
留言10則, 5人參與, 1年前最新討論串2/7 (看更多)
※ 引述《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; } } -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.134.5.239 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Gossiping/M.1661233112.A.F84.html ※ 編輯: applebg (220.134.5.239 臺灣), 08/23/2022 13:40:10

08/23 13:40, 1年前 , 1F
少分號啦
08/23 13:40, 1F
※ 編輯: applebg (220.134.5.239 臺灣), 08/23/2022 13:41:14

08/23 13:42, 1年前 , 2F
要include 抗中保台.h還是人權.h
08/23 13:42, 2F

08/23 13:43, 1年前 , 3F
不對吧 你這樣寫變成所有殺警都判死
08/23 13:43, 3F

08/23 13:43, 1年前 , 4F
[error]expected ';' at row 15.
08/23 13:43, 4F
※ 編輯: applebg (220.134.5.239 臺灣), 08/23/2022 13:46:02

08/23 13:52, 1年前 , 5F
改好了推回來 另外忘記把殺警判斷放
08/23 13:52, 5F

08/23 13:52, 1年前 , 6F
在#ifdef political_scandal_h 判斷
08/23 13:52, 6F

08/23 13:52, 1年前 , 7F
裡面 前面有沒有這個定義compile出來
08/23 13:52, 7F

08/23 13:52, 1年前 , 8F
會差很多
08/23 13:52, 8F

08/23 18:39, 1年前 , 9F
怕你尷尬,幫你推一下,不忍看幾個程式
08/23 18:39, 9F

08/23 18:39, 1年前 , 10F
猿取暖自嗨
08/23 18:39, 10F
文章代碼(AID): #1Z16VO-4 (Gossiping)
討論串 (同標題文章)
本文引述了以下文章的的內容:
以下文章回應了本文
完整討論串 (本文為第 2 之 7 篇):
文章代碼(AID): #1Z16VO-4 (Gossiping)