古詩詞大全網 - 四字成語 - scilab中三項選擇應該使用什麽語句?

scilab中三項選擇應該使用什麽語句?

使用 if elseif else end語句。

例子:

if x>0 then printf("positive");

elseif x==0 then printf("zero");

else printf("negtive");

end