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

看板Gossiping作者 (格子迷宮)時間1年前 (2022/08/23 15:43), 1年前編輯推噓0(001)
留言1則, 1人參與, 1年前最新討論串5/7 (看更多)
※ 引述《pchion2002 (阿我就怕被罵阿)》之銘言: : 各位大師下午好 : 昨天兩名警察領了盒飯 : 造就了有金句產生 : 從程式語言來看下面這句話 : 「我反對死刑但這一定要判死」 : 判斷式要怎麼寫才能成立? std::maps <string,string> dpp_lists; //Should init. const bool opinion_for_death = True; string prisoner_name; cin >> prisoner_name; if( dpp_lists.find(prisoner_name) != dpp_lists.end()){ //Delete by 數位中介法 exit(0); } else if( IsPrisonerKillPolice(prisoner_name) ){ if( IsAbnormal(prisoner_name){ //思覺失調 ..etc cout << "Probation?" << endl; } else if( QueryPoll("Taiwan") > 0.5 ){ //民調領先 cout << "Prisoner go to jail forever." << endl; } else if( QueryPoll("Taiwan") <= 0.5){ //民調落後 cout << "Do execution now." << endl; } else{ cerr << "Should not happen. Program error" << endl; exit( -1 ); } } else{ //TODO } -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.171.17.51 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Gossiping/M.1661240621.A.0EB.html ※ 編輯: oxlittle (1.171.17.51 臺灣), 08/23/2022 15:50:32

08/23 15:51, 1年前 , 1F
條件只有一個:對「當次選舉」有利。
08/23 15:51, 1F
※ 編輯: oxlittle (1.171.17.51 臺灣), 08/23/2022 15:56:37 ※ 編輯: oxlittle (1.171.17.51 臺灣), 08/23/2022 16:00:25
文章代碼(AID): #1Z18Kj3h (Gossiping)
討論串 (同標題文章)
文章代碼(AID): #1Z18Kj3h (Gossiping)