C语言中,这个分段函数如何用switch-case语句实现? 时间:2026-11-25 18:32:00 浏览:921次 bool isNegitive = x < 0 ; switch ( isNegitive ){ case true : return - 1 ; case false : return 2 * x ; } 标签:C语言,switch,case,程序员,编程语言,编程,C(编程语言)