-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
191 lines (172 loc) · 4.78 KB
/
index.html
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!doctype html>
<html lang=lang="zh-TW">
<head>
<meta charset="Big-5">
<title>If & While loop</title>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/night.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!--Add support for earlier versions of Internet Explorer -->
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<!-- 使用 reveal 與 slides 的 div 將整個簡報包起來 -->
<div class="reveal">
<div class="slides">
<!-- 簡報內容開始 -->
<!-- 一個 section 表示一頁簡報 -->
<section>
<h2>判斷</h2>
<p>如果明天下雨,就帶雨傘。 </p>
<p>條件:明天下雨</p>
<p>敘述:帶雨傘</p>
<h2> Code:</h2>
<pre><code class="hljs cpp" data-trim contenteditable>
if(condition)
statement;
</code></pre>
</section>
<!-- 第二頁簡報 -->
<section>
<h1>數值判斷</h1>
<style type="text/css">
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
.tg .tg-yw4l{vertical-align:top}
</style>
<table class="tg">
<tr>
<th class="tg-yw4l">數值判斷</th>
<th class="tg-yw4l">語法</th>
</tr>
<tr>
<td class="tg-yw4l">大於</td>
<td class="tg-yw4l">></td>
</tr>
<tr>
<td class="tg-yw4l">小於</td>
<td class="tg-yw4l"><</td>
</tr>
<tr>
<td class="tg-yw4l">等於</td>
<td class="tg-yw4l">==</td>
</tr>
<tr>
<td class="tg-yw4l">大於等於</td>
<td class="tg-yw4l">>=</td>
</tr>
<tr>
<td class="tg-yw4l">小於等於</td>
<td class="tg-yw4l"><=</td>
</tr>
<tr>
<td class="tg-yw4l">且</td>
<td class="tg-yw4l">&&</td>
</tr>
<tr>
<td class="tg-yw4l">或</td>
<td class="tg-yw4l"> ||</td>
</tr>
</table>
</section>
<!-- 第三頁簡報 -->
<section>
<h1>if then else</h1>
<h3>先來看份 Code 吧</h3>
</section>
<!-- 第四頁簡報 -->
<section>
<h1>if then else</h1>
<pre><code class="hljs cpp" data-trim contenteditable>
if (condition)
statement1;
else
statement2;
</code></pre>
</section>
<!-- 第五頁簡報 -->
<section>
<h1>實例:</h1>
<pre><code class="hljs cpp" data-trim contenteditable>
int main() {
int year;
scanf("%d", &year); // 輸入年份year
if (year%400 == 0 ) {
printf("%d是閏年\n", year);
}
else if( (year%4 == 0) && (year%100 != 0)){
printf("%d是閏年\n", year);
}
else {
printf("%d不是閏年\n", year);
}
}
</code></pre>
</section>
<!-- 第六頁簡報 -->
<section>
<h1>迴圈</h1>
迴圈?一種可以幫助我們重複而且大量性的計算
所以高階語言都有迴圈的機制
</section>
<!-- 第七頁簡報 -->
<section>
<h1>While</h1>
<h3>再來看份 Code 吧</h3>
</section>
<!-- 第八頁簡報 -->
<section>
<h1>While</h1>
<pre><code class="hljs cpp" data-trim contenteditable>
while (condition)
statement1;
</code></pre>
</section>
<!-- 第九頁簡報 -->
<section>
<h2>至於 While 的複合敘述</h2>
<p>就跟 if 一樣 回家自己想想囉</p>
</section>
<!-- 第十頁簡報 -->
<section>
<h3>這邊直接上圖片,幫助了解while運作過程</h3>
<img src="https://blog.penjee.com/wp-content/uploads/2015/11/while-loop-if-else-even-vs-odd-animation-how-it-works.gif">
</section>
<!-- 第十一頁簡報 -->
<section>
<h2>練習題</h2>
<p>Greenjudge:a011</p>
<p>Greenjudge:a012</p>
<p>Greenjudge:a024</p>
<p>Greenjudge:a021</p>
<p>Greenjudge:a024</p>
</section>
<!-- 簡報內容結束 -->
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>