This repository was archived by the owner on Oct 11, 2019. It is now read-only.
forked from taivs106/DACSC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecide.html
More file actions
150 lines (127 loc) · 40.2 KB
/
decide.html
File metadata and controls
150 lines (127 loc) · 40.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=gb2312" ><title>條件判斷</title><!--[if gte mso 9]><xml><w:WordDocument><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery><w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery><w:DocumentKind>DocumentNotSpecified</w:DocumentKind><w:DrawingGridVerticalSpacing>7.8</w:DrawingGridVerticalSpacing><w:View>Web</w:View><w:Compatibility><w:DontGrowAutofit/></w:Compatibility><w:Zoom>0</w:Zoom></w:WordDocument></xml><![endif]--><!--[if gte mso 9]><xml><w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="156" ><w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" Name="Normal" ></w:LsdException><w:LsdException Locked="false" Priority="9" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1" ></w:LsdException><w:LsdException Locked="false" Priority="9" SemiHidden="false" QFormat="true" Name="heading 2" ></w:LsdException><w:LsdException Locked="false" Priority="9" SemiHidden="false" QFormat="true" Name="heading 3" ></w:LsdException><w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" ></w:LsdException><w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" ></w:LsdException><w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" ></w:LsdException><w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" ></w:LsdException><w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" ></w:LsdException><w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="index 1" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="index 2" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="index 3" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="index 4" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="index 5" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="index 6" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="index 7" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="index 8" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="index 9" ></w:LsdException><w:LsdException Locked="false" Priority="39" Name="toc 1" ></w:LsdException><w:LsdException Locked="false" Priority="39" Name="toc 2" ></w:LsdException><w:LsdException Locked="false" Priority="39" Name="toc 3" ></w:LsdException><w:LsdException Locked="false" Priority="39" Name="toc 4" ></w:LsdException><w:LsdException Locked="false" Priority="39" Name="toc 5" ></w:LsdException><w:LsdException Locked="false" Priority="39" Name="toc 6" ></w:LsdException><w:LsdException Locked="false" Priority="39" Name="toc 7" ></w:LsdException><w:LsdException Locked="false" Priority="39" Name="toc 8" ></w:LsdException><w:LsdException Locked="false" Priority="39" Name="toc 9" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Normal Indent" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="footnote text" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="annotation text" ></w:LsdException><w:LsdException Locked="false" Priority="0" Name="header" ></w:LsdException><w:LsdException Locked="false" Priority="0" Name="footer" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="index heading" ></w:LsdException><w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="table of figures" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="envelope address" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="envelope return" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="footnote reference" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="annotation reference" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="line number" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="page number" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="endnote reference" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="endnote text" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="table of authorities" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="macro" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="toa heading" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Bullet" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Number" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List 2" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List 3" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List 4" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List 5" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Bullet 2" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Bullet 3" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Bullet 4" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Bullet 5" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Number 2" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Number 3" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Number 4" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Number 5" ></w:LsdException><w:LsdException Locked="false" Priority="10" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Title" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Closing" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Signature" ></w:LsdException><w:LsdException Locked="false" Priority="0" SemiHidden="false" Name="Default Paragraph Font" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Body Text" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Body Text Indent" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Continue" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Continue 2" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Continue 3" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Continue 4" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="List Continue 5" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Message Header" ></w:LsdException><w:LsdException Locked="false" Priority="11" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtitle" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Salutation" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Date" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Body Text First Indent" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Body Text First Indent 2" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Note Heading" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Body Text 2" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Body Text 3" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Body Text Indent 2" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Body Text Indent 3" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Block Text" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Hyperlink" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="FollowedHyperlink" ></w:LsdException><w:LsdException Locked="false" Priority="22" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Strong" ></w:LsdException><w:LsdException Locked="false" Priority="20" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Emphasis" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Document Map" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Plain Text" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="E-mail Signature" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Normal (Web)" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="HTML Acronym" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="HTML Address" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="HTML Cite" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="HTML Code" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="HTML Definition" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="HTML Keyboard" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="HTML Preformatted" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="HTML Sample" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="HTML Typewriter" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="HTML Variable" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Normal Table" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="annotation subject" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="No List" ></w:LsdException><w:LsdException Locked="false" Priority="99" Name="Balloon Text" ></w:LsdException></w:LatentStyles></xml><![endif]--><style>
@font-face{
font-family:"Times New Roman";
}
@font-face{
font-family:"宋体";
}
@font-face{
font-family:"Microsoft YaHei";
}
@font-face{
font-family:"SimSun";
}
@font-face{
font-family:"Tahoma";
}
@font-face{
font-family:"Symbol";
}
@font-face{
font-family:"Arial";
}
@font-face{
font-family:"SimHei";
}
@font-face{
font-family:"Courier New";
}
@font-face{
font-family:"Wingdings";
}
@font-face{
font-family:"標楷體";
}
@font-face{
font-family:"微軟正黑體 Light";
}
@font-face{
font-family:"新細明體";
}
@list l0:level1{
mso-level-number-format:decimal;
mso-level-suffix:tab;
mso-level-text:"%1.";
mso-level-tab-stop:39.0000pt;
mso-level-number-position:left;
margin-left:39.0000pt; text-indent:-18.0000pt; margin-bottom:0pt; margin-top:0pt; font-family:'Times New Roman'; }
@list l1:level1{
mso-level-number-format:bullet;
mso-level-suffix:tab;
mso-level-text:\F06C;
mso-level-tab-stop:81.0000pt;
mso-level-number-position:left;
margin-left:81.0000pt; text-indent:-18.0000pt; margin-bottom:0pt; margin-top:0pt; font-family:'Wingdings'; }
@list l2:level1{
mso-level-number-format:decimal;
mso-level-suffix:tab;
mso-level-text:"%1.";
mso-level-tab-stop:18.0000pt;
mso-level-number-position:left;
margin-left:18.0000pt; text-indent:-18.0000pt; margin-bottom:0pt; margin-top:0pt; font-family:'Times New Roman'; }
@list l3:level1{
mso-level-number-format:bullet;
mso-level-suffix:tab;
mso-level-text:\F06C;
mso-level-tab-stop:18.0000pt;
mso-level-number-position:left;
margin-left:18.0000pt; text-indent:-18.0000pt; margin-bottom:0pt; margin-top:0pt; font-family:'Wingdings'; }
@list l4:level1{
mso-level-number-format:bullet;
mso-level-suffix:tab;
mso-level-text:\F06C;
mso-level-tab-stop:60.0000pt;
mso-level-number-position:left;
margin-left:60.0000pt; text-indent:-18.0000pt; margin-bottom:0pt; margin-top:0pt; font-family:'Wingdings'; }
@list l5:level1{
mso-level-number-format:decimal;
mso-level-suffix:tab;
mso-level-text:"%1.";
mso-level-tab-stop:60.0000pt;
mso-level-number-position:left;
margin-left:60.0000pt; text-indent:-18.0000pt; margin-bottom:0pt; margin-top:0pt; font-family:'Times New Roman'; }
@list l6:level1{
mso-level-number-format:bullet;
mso-level-suffix:tab;
mso-level-text:\F06C;
mso-level-tab-stop:39.0000pt;
mso-level-number-position:left;
margin-left:39.0000pt; text-indent:-18.0000pt; margin-bottom:0pt; margin-top:0pt; font-family:'Wingdings'; }
@list l7:level1{
mso-level-number-format:bullet;
mso-level-suffix:tab;
mso-level-text:\F06C;
mso-level-tab-stop:102.0000pt;
mso-level-number-position:left;
margin-left:102.0000pt; text-indent:-18.0000pt; margin-bottom:0pt; margin-top:0pt; font-family:'Wingdings'; }
@list l8:level1{
mso-level-number-format:decimal;
mso-level-suffix:tab;
mso-level-text:"%1.";
mso-level-tab-stop:81.0000pt;
mso-level-number-position:left;
margin-left:81.0000pt; text-indent:-18.0000pt; margin-bottom:0pt; margin-top:0pt; font-family:'Times New Roman'; }
@list l9:level1{
mso-level-number-format:decimal;
mso-level-suffix:tab;
mso-level-text:"%1.";
mso-level-tab-stop:102.0000pt;
mso-level-number-position:left;
margin-left:102.0000pt; text-indent:-18.0000pt; margin-bottom:0pt; margin-top:0pt; font-family:'Times New Roman'; }
p.p0{
margin:0pt;
margin-bottom:0.0001pt;
margin-bottom:0pt;
margin-top:0pt;
font-family:'Times New Roman'; }
@page{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}@page Section0{
margin-top:72.0000pt;
margin-bottom:72.0000pt;
margin-left:90.0000pt;
margin-right:90.0000pt;
size:595.3000pt 841.9000pt;
layout-grid:15.6000pt;
}
div.Section0{page:Section0;}</style></head><body style="tab-interval:36pt; text-justify-trim:punctuation; " ><!--StartFragment--><div class="Section0" style="layout-grid:15.6000pt;
" ><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:center; line-height:240%; " ><span style="mso-spacerun:'yes'; font-weight:bold; font-size:48.0000pt; font-family:'標楷體'; " >條件判斷</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; line-height:170%; " ><span style="mso-spacerun:'yes'; font-weight:bold; font-size:22.0000pt; font-family:'標楷體'; " >條件判斷使用時機</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-left:21.0000pt; text-indent:-21.0000pt; margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'Wingdings'; " >l </span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >如果成績>=60分,本學期pass</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-left:21.0000pt; text-indent:-21.0000pt; margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'Wingdings'; " >l </span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >如果身上有120元,可以吃小火鍋</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-left:21.0000pt; text-indent:-21.0000pt; margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'Wingdings'; " >l </span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >如果葉俊廷喜歡吳承儒,他是GAY</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-left:21.0000pt; text-indent:-21.0000pt; margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'Wingdings'; " >l </span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >...etc</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:bold; font-size:22.0000pt; font-family:'標楷體'; " >如何使用?</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-left:21.0000pt; text-indent:-21.0000pt; margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'Wingdings'; " >l </span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >If-else if-else</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-left:21.0000pt; text-indent:-21.0000pt; margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'Wingdings'; " >l </span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >三元運算子(?:;)</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-left:21.0000pt; text-indent:-21.0000pt; margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'Wingdings'; " >l </span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >switch-case</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:bold; font-size:22.0000pt; font-family:'標楷體'; " >條件判斷的敘述式</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-left:21.0000pt; text-indent:-21.0000pt; margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'Wingdings'; " >l </span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >>、<代表大於小於</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-left:21.0000pt; text-indent:-21.0000pt; margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'Wingdings'; " >l </span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >==代表等於</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-left:21.0000pt; text-indent:-21.0000pt; margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'Wingdings'; " >l </span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >!代表不,!=代表不等於</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-left:21.0000pt; text-indent:-21.0000pt; margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'Wingdings'; " >l </span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >&&代表且,且的兩邊敘述皆須成真才會成真</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-left:21.0000pt; text-indent:-21.0000pt; margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'Wingdings'; " >l </span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >||代表或,或的兩邊敘述只要有一個為真就會成真</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:bold; font-size:22.0000pt; font-family:'標楷體'; " >if-else if-else</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >先來看看難過英翻中:如果、其他的如果、其他</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >再來看個簡單的範例</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span><img width="391" height="234" src="decide.files/decide-353.png" ></span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'新細明體'; " >以及執行結果</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span><img width="554" height="210" src="decide.files/decide-439.png" ></span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >由此可觀察到,程式執行了if(a+b<10)的括號裡面的程式</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >因此得知:</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >if(條件敘述){</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >區塊1}else if(條件敘述){</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >區塊2}else{</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >區塊3</span><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >}</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >當區塊1執行完畢後,會直接結束這次的if、else if、else</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >且當任意一個else if中的區塊被執行時,也會結束本次的if、else if、else</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >假如還不能理解的話,我們看一下這張圖:</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span><img width="453" height="386" src="decide.files/decide-700.png" ></span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >此圖分為4個區塊,當任意區塊被執行時就不再看這張圖,而if的條件敘述成真時會執行白色的區塊,第一個else if的條件敘述成真時會執行藍色的區塊,第二個else if的條件敘述成真時會執行紫色的區塊,三個都不成真時執行黑色的區塊。</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:bold; font-size:22.0000pt; font-family:'標楷體'; " >三元運算子</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >還記得剛剛的if-else if-else嗎?</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >假如我們現在只有if-else,則三元運算子可有效提升程式碼的可讀性</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >如何使用呢?我們來舉個例子:</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span><img width="553" height="84" src="decide.files/decide-976.png" ></span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'新細明體'; " >執行結果</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span><img width="554" height="210" src="decide.files/decide-1063.png" ></span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >因為第一行輸出的4是b代表的值,而b又在冒號後面,第二行輸出的是a小於b,且輸出a小於b的指令是在問號後面冒號前面,觀察後得知假如問號前面的條件敘述為真,會執行問號後面冒號前面的程式碼,否則執行冒號後面分號前面的程式碼。</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >下面為三元運算子和if-else的替換:</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >條件敘述?區塊1:區塊2;</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >If(條件敘述){</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >區塊1</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >}else{</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >區塊2</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >}</span><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:bold; font-size:22.0000pt; font-family:'標楷體'; " >switch case</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:normal; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >我們直接拿if、else if、else來比較,這兩個程式碼執行結果與邏輯是一樣的</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span><img width="814" height="466" src="decide.files/decide-1375.png" ></span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span><img width="817" height="561" src="decide.files/decide-1455.png" ></span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >要注意的是break,假如沒打這行的話會繼續判斷下一個case而不會自動跳出switch!</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p> </o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-weight:bold; font-size:22.0000pt; font-family:'標楷體'; " >練習一下</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >1. DAOJ 1005的季節判斷</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >2. 輸入四個整數後輸出最大值</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >3. 輸入任一年份後判斷他是否為閏年</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >Hint:</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >1. 1005那題需要!=EOF,且注意大小寫、換行問題</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >2. 假如善用變數儲存結果</span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >再</span><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >輸出答案會比較好做</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p><p class=p0 style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; text-align:justify; " ><span style="mso-spacerun:'yes'; font-size:16.0000pt; font-family:'微軟正黑體 Light'; " >3. 當某一年份符合被4整除且不被100整除,或是被400整除時,其為閏年</span><span style="mso-spacerun:'yes'; font-size:12.0000pt; font-family:'Times New Roman'; " ><o:p></o:p></span></p></div><!--EndFragment--></body></html>