📜  三元运算符 rsut - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:52.313000             🧑  作者: Mango

代码示例1
// Rust does not have ternary operators
// but if-else statemetn can have return value so :
let i = if x > 5 { 10 } else { 7 }; // works