if文を理解しよう

それぞれの違いを理解しよう。

if(条件A){
処理1
}
else{
処理2
}

if(条件A){

if(条件B){

処理2

}

 else{
  処理1
  }
}
if(条件A){
処理1
}
if(条件B){
 処理3
}
else{

処理2

}