Page 184 - การเขียนโปรแกรมบนมาตรฐานเปิด
P. 184

184


                       6.4 if, if-else, if else – if else Statements

                       If – else statements ควรใช้รูปแบบดังนี้

               If (condition) {
                       Statements;

               }



               If (condition) {
                       Statements;

               } else {

                       Statements;

               }


               If (condition) {

                       Statements;

               } else if (condition) {

                       Statements;

               } else {
                       Statements;

               }



                       6.5 for Statements

                       For Statements ควรใช้รูปแบบดังนี้
                       For (initialization; condition; update) {

               }

               และส าหรับ empty for statements ควรใช้รูปแบบดังนี้

               For (initialization; condition; update);
   179   180   181   182   183   184   185   186   187   188   189