2つの質問があります-(I)
code-fragment-1
if(<condition-statement>){
}
else if(<condition-statement-2>){
//statements-1
}
//statements-2
コードフラグメント-2
if(<condition-statement>){
}
else{
if(<condition-statement-2>){
//statements-1
}
//statements-2
}
上記の2つのコードフラグメントは同じですか?
(II)else if
s(C ++の場合)はいつ使用されますか?