周郁琦清單方塊ListBox與核取方塊CheckBox
巢狀條件if else
期中考非巢狀
三道指令,每一個指令都執行,例如已經滿足(r),另外二道還是去執行。if (r) present("#FF0000");
if (g) present("#00FF00");
if (b) present("#0000FF");
期中考巢狀
變成四道指令,提升程式效率
if (r) present("#FF0000");
else if (g) present("#00FF00");//沒有滿足(r)就執行
else if (b) present("#0000FF");
else alert("輸入的顏色條件,不滿足r, g, b,其他的!");
11月第一週期中考
紅色
綠色
藍色
粗體
if (r) present("#FF0000");
else if (g) present("#00FF00");//沒有滿足(r)就執行
else if (b) present("#0000FF");
else alert("輸入的顏色條件,不滿足r, g, b,其他的!");
11月第一週期中考
紅色 綠色 藍色
粗體
輸出
要做十一月十五日
回覆刪除