if else switch case default n for while Slides: 18 Download presentation 制御構造 条件分岐 if else switch case default n ループ処理 for while do break continue n 復習) 論理演算 論理和 – || n n n いずれかが true ならば true || true -- true || false – true false || true – true false || false – false ( 10 > 100 || 10 < 100 ) 復習) 論理演算 論理積 -- && n n n いずれの値も true の時のみ true && true – true && false – false && true – false && false – false ( 10 > 100 && 10 < 100 ) 3つ以上の処理から選択 if( x > 100 ) { System. out. println( “Too big” ); } else if( 0 <= x ) { System. out. println( “OK” ); } else { System. out. println( “Too small” ); } switch – case による判定 int x ; switch( x ) { case 1: word = “One”; break; case 2: word = “Two”; break; default: word = “”; } 繰り返し – whileのループ(2) int count = 1; while( count <= 10 ) { System. out. println( count ); count ++; } // count の値を 1 から 10 まで 10回表示 二重ループ for( int i=1; i<=9; i++ ) { for( int j=1; j<=9; j++) { System. out. println( i+j ); } } *9 X 9で81回の処理! Well myself and somebody else and somebody else analysisVethernet (default switch)Clear matlab command windowAre switch statements faster than if/elseWhile loops and if-else structuresIn a banyan switch micro switchGo proximity limit switchBest case worst case average caseBasic select caseDo while loopSwitch c++ exampleJulia switch caseSwitch in pseudocodeSwitch statement in cGame theory switch caseNn matlabSwitch case algorithmCommand line arguments in unixJava gotchas