Re: [问卦] 用if else叙述反对死刑但这个必须死

楼主: oxlittle (牛牛)   2022-08-23 15:43:39
※ 引述《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
}

Links booklink

Contact Us: admin [ a t ] ucptt.com