หนึ่งในปัญหาคลาสิก เวลาเขียนโปรแกรมที่ทุกคนต้องเจอเลย
ก็คือการบวกลบเลขทศนิยมในภาษาโปรแกรม ของบางภาษา นี้แหละ
เช่น JavaScript, Python, Perl, C#, C, C++, Java, PHP, Fortran
(และอื่นๆ อีกหลายภาษาที่ไม่ได้กล่าวถึง)
.
หลายครั้งที่มันอาจเพี้ยนได้ เช่น
👉 0.1+0.2 ไม่ได้เท่ากับ 0.3
แต่ได้เป็น 0.30000000000000004
.
👉 หรือ 0.1 บวกกัน 10 ครั้ง ก็ไม่ได้เป็น 1
แต่ได้เป็น 0.9999999999999999
.
คนเขียนโปรแกรมเจอแบบนี้เข้าไป
ก็เหมือนมวยโดนหมัดน๊อคมึนงงในดงโค้ด
:
:
แต่ใช่ว่ามันจะเพี้ยนทุกครั้ง ซะเมื่อไร เช่น
0.5+0.5 = 1 (ถูกต้องเป๊ะ)
0.2+0.3 = 0.5 (บังเอิญไม่เพี้ยน)
.
สำหรับ กรณี 0.2 กับ 0.3 มันถูกตัดเศษเหลือเป็น
0.2000000000000000111022302462515654042363166809082031250
กับ
0.2999999999999999888977697537484345957636833190917968750
พอบวกกันจึงได้ 0.5 พอดี แบบฟลุ๊คๆๆ ซึ่งไม่ควรทำได้
(ตรงสอบดูได้ 0.2+0.3 == 0.5 ได้ค่าออกมาเป็น true)
:
:
สาเหตุที่เป็นเช่นนี้
ก็เพราะว่าคอมพิวเตอร์มันรู้จักแต่ เลขฐาน2 อะนะ
ต่อให้เราเขียนโค้ดใช้เลขฐาน10 ก็ตาม
สุดท้ายเวลาโค้ดมันถูกรัน ก็จะกลายเป็นเลขฐาน 2 อยู่ดี
.
😨 แล้วก็เป็นความซวยที่จะมาเยือนคนเขียนโปรแกรม
เพราะเวลาแปลงเลขฐาน10 ไปเป็นเลขฐาน 2
บางกรณีมันแปลงแล้ว ดันได้ตัวเลขที่ไม่รู้จบเสียด้วยซิ
จึงทำให้การเก็บทศนิยมผิดเพี้ยนไปได้
.
สำหรับรูปแบบการจัดเก็บเลขทศนิยม ในหลายภาษา
เขาจะนิยมใช้มาตรฐาน IEEE-754 floating point
เช่น 0.1 จะถูกมองว่าคือ 1/10
.
เมื่อเก็บเป็นเลขทศนิยมฐานสอง
ตามมาตรฐาน IEEE-754 floating point จะได้เป็น
0.0001100110011001100110011001100110011001100110011...
เป็นทศนิยมไม่รู้จบในรูปเลขฐานสอง ....นี้คือสิ่งที่คอมมองเห็น
.
พอคอมแปลงกลับมาเป็นทศนิยม เพื่อให้มนุษย์โลกอ่านเข้าใจ
ในรูปฐาน 10 ก็จะได้เป็น
0.1000000000000000055511151231257827021181583404541015625
ทว่าคอมมันจะตัดให้เหลือแค่ 0.1 (คนจึงเห็นแค่นี้)
:
🤔 ซึ่งความเพื้ยนแบบนี้
แน่นอนทำให้เกิดบั๊กเวลาคำนวณตัวเลข
- ยิ่งงานต้องการคำตอบที่ละเอียดมาก เช่น งานธนาคาร ก็จะประสบปัญหา เป็นต้น
- หรือเวลานำไปใช้ในเงื่อนไขเปรียบเทียบพวก if, while ฯลฯ ก็อาจมีบั๊กเกิดขึ้นได้ เป็นต้น
.
😀 แต่ไม่ต้องห่วง ในหลายๆ ภาษาเขาจะมีวิธีแก้ปัญหานี้อยู่ครับ
ป้องกันการคำนวณตัวเลข ไม่ให้คลาดเคลื่อน เช่น
- ใน Java ก็จะมีคลาส BigDecimal เอาไว้บวกลบคูณหาร สำหรับเลขทศนิยมโดยเฉพาะ
- ใน Python ก็จะมีคลาสคล้ายๆ กัน เช่น Decimal
- ส่วนใน JavaScript อาจใช้ไลบรารี่ ซึ่งมีให้เลือกเยอะเช่น
https://github.com/MikeMcl/decimal.js/
https://github.com/MikeMcl/bignumber.js/
https://github.com/MikeMcl/big.js/
- ภาษาอื่นที่เหลือลองไปศึกษาเองดูนะครับ
.
.
เรื่องบวกลบคูณหาร เลขทศนิยม ถือเป็นเรื่องสำคัญที่ไม่ควรมองข้าม
โดยส่วนตัวก็เคยเจอความเผลอเรอตรงนี้
ในระดับโปรเจคระดับธนาคาร ก็เคยพลาดมาแล้ว
สุดท้ายต้องมาไล่นั่งแก้โค้ดหลายบรรทัด
เสียเวลานั่งไล่ test ใหม่อีกรอบอีก
.
หมายเหตุเห็นคอมเมนต์สงสัยว่า
PHP กับ C# รอดชะตากรรมเดียวกันไหม ?
ก็บอกว่าไม่รอดครับ
.
// ลองดูตัวอย่างโค้ด C#
Console.WriteLine( ((0.1+0.2) == 0.3)); // False
Console.WriteLine( ((0.1+0.2) == 0.30000000000000004)); // True
// ลองดูตัวอย่างโค้ด PHP
echo number_format(0.1+0.2 , 17);
.
++++++
เขียนโดย โปรแกรมเมอร์ไทย thai programmer
อ่านเรื่อง IEEE-754 floating point ได้ที่
https://th.wikipedia.org/wiki/จำนวนจุดลอยตัว
One of those classic problems, programming that everyone needs to encounter.
It's positive to delete decimal numbers in some language.
เช่น JavaScript, Python, Perl, C#, C, C++, Java, PHP, Fortran
(and many other languages not mentioned)
.
Many times it can be crazy like
👉 0.1 + 0.2 is not equal to 0.3
But I got to be 0.30000000000000004
.
👉 or 0.1 plus 10 times. It's not 1
But I got to be 0.9999999999999999
.
The Programmer found this.
It's like boxing. I got hit by a punch. I'm confused in dong code.
:
:
But it's not that it's crazy every time like
0.5 + 0.5 = 1 (exactly correct)
0.2 + 0.3 = 0.5 (accidentally not crazy)
.
For Case 0.2 and 0.3 it was cut down.
0.2000000000000000111022302462515654042363166809082031250
With the.
0.2999999999999999888977697537484345957636833190917968750
When we are positive, we get 0.5 fit like fluke which you shouldn't be able to do.
(I can watch the exam. 0.2 + 0.3 == 0.5 get the value to be true)
:
:
The cause is like this
Because computers only know the base number 2
Even if we write code, use base number 10
In the end, when the code is run, it will become base number 2 anyway.
.
😨 and it's bad luck to visit the programmer.
Because time to convert base number 10 to base number 2
In some cases, it's converted and I get the number that I don't end.
So it makes the decimal picking wrong.
.
For the decimal number storage in multiple languages
He will be popular with IEEE-754 floating point standards
For example, 0.1 will be seen as 1/10
.
When keeping it as a decimal number, base two.
According to IEEE-754 floating point standards.
0.0001100110011001100110011001100110011001100110011...
It's a decimal. I don't finish in the second base picture.... this is what the computer can see.
.
When the computer converts back to decimal so that the world can read and understand.
In the picture of base 10 will be.
0.1000000000000000055511151231257827021181583404541015625
But the computer will cut to only 0.1 (so people see this)
:
🤔 this kind of being
Sure. It makes cuddle times to calculate numbers.
- the more jobs need detailed answers such as banking work, there will be problems, etc.
- or time to use in comparison terms. If, while etc. There may be cuddle baht.
.
😀 but don't worry. in many languages, there will be a solution to this problem.
Prevent calculation of numbers from inaccurate such as
- in Java, there will be bigdecimal class to delete multiplication for decimal numbers especially.
- in python, there will be similar classes such as decimal.
- Javascript may use a lot of libraries to choose from.
https://github.com/MikeMcl/decimal.js/
https://github.com/MikeMcl/bignumber.js/
https://github.com/MikeMcl/big.js/
- the rest of the other languages, try to study it yourself.
.
.
It's important to delete multiplication, divide the decimal numbers. It's important that you should not overlook.
Personally, I have met a burp here.
At Project Level, bank level has been missed.
Finally, I have to sit and fix many lines of code.
Wasting time to sit and chase the test again.
.
Note that I see the comments. I wonder if
Php and c #survive the same fate?
I said I wouldn't survive.
.
// check out the code C Sample #
Console.WriteLine( ((0.1+0.2) == 0.3)); // False
Console.WriteLine( ((0.1+0.2) == 0.30000000000000004)); // True
// check out the sample code php
echo number_format(0.1+0.2 , 17);
.
++++++
Written by Thai Programmer Thai programmer
Read about IEEE-754 floating point at
https://th.wikipedia.org/wiki/จำนวนจุดลอยตัวTranslated
同時也有757部Youtube影片,追蹤數超過12萬的網紅prasertcbs,也在其Youtube影片中提到,ดาวน์โหลดไฟล์ตัวอย่างได้ที่ https://goo.gl/hrJuA4 เชิญสมัครเป็นสมาชิกของช่องนี้ได้ที่ ► https://www.youtube.com/subscription_center?add_user=prasertcb...
while python 在 美國在台協會 AIT Facebook 八卦
【跟著AIT一起學程式設計】
Python系列的最後一堂課來囉!今天我們要教大家在Python中製作Hangman 猜字遊戲,這個遊戲可以加強英文字彙和拼字能力。我們會從匯入單字題目、設定答錯次數、判斷是否答對等步驟,一步步慢慢建構出猜字遊戲。在這堂課程中,除了可以學會客製化自己的遊戲之外,大家也會複習到前幾支影片中 import、input、print、for / while、if / else等邏輯的綜合運用!如果你還沒看過前面幾支影片也沒有關係,相信老師清楚的解說會讓你馬上了解箇中要領。一起跟著做看看!#PythonForBeginners #Python
* AIT程式語言課程是因應新冠疫情而推出的線上活動之一。
Learning Python with AIT
Here is our last Python class! Today we will show you how to code a hangman word guessing game in Python. It’s a game that can help improve vocabulary and spelling. You will start by importing word banks, setting maximum guessing times…and build the game step by step. In addition to customizing a game that suits you, you will also get to review Python logic, such as import, input, print, for / while and if / else statements. Don’t worry if you haven’t watched the previous episodes, since the clear instructions make it easy. Let’s check out this video and start coding! #PythonForBeginners #Python
*The series of Python classes is part of AIT's online learning resources.
while python 在 Eric's English Lounge Facebook 八卦
[教育資源] 美國哈佛大學線上課程
Here are more free classes from Harvard while we are stuck at home waiting for school to reopen! The following are seven courses that will help prepare you for the challenges of today’s dynamic and fast-changing world.
當我們被困在家等待學校重新開放時,有更多來自哈佛大學的免費課程提供給大家! 這裡提供七項課程來幫助大家,應對來自當今這充滿活力與快速變化的世界的挑戰。
★★★★★★★★★★★★
1. Introduction to Computer Science 電腦科學導論
https://www.edx.org/course/cs50s-introduction-to-computer-science
Knowing how to code is a vital skill in in today’s digital world. This entry level course teaches the basics of computational thinking, programming problem solving, data structures, and web development, among other things. It will leave the learner able to code in several languages including C, Python, and Java.
在當今的數位世界中,知曉如何編碼乃是至關重要的技能。 本入門課程教授運算思維、程式編寫與問題解決、資料結構和網頁開發等基礎知識。 它將使學習者能夠使用多種程式語言包括C,Python和Java進行編碼。
★★★★★★★★★★★★
2. The Architectural Imagination 建築的想像力
https://www.edx.org/course/the-architectural-imagination
Art and science are often viewed in opposition to one another, but in the field of architecture they meet in fantastic and beautiful ways. In this class, students will learn both the technical and cultural aspects of architecture, and gain a better understanding of how the buildings we inhabit relate to history, values, and pragmatic concerns.
人們常常將藝術與科學放在對立面,但在建築的領域,它們以奇妙而優美的方式相遇。在本課程中,學生將學習建築的技術和文化層面,並更好地了解我們所居住的建築與歷史、價值和實用主義的關係。
★★★★★★★★★★★★
3. Super-Earths and Life 超級地球與生命
https://www.edx.org/course/super-earths-and-life
What life lies beyond our small world? Thirty years ago we only knew about nine planets; today we know of thousands nearby stars. In this course, students will learn about exoplanets, which ones might be the best candidates for harboring life, and why those planets are of the greatest interest. Combining concepts in astronomy and biology which have rarely been put together before, the class is an excellent introduction to one of the most interesting eras in astrobiology; today.
在我們的小小世界之外,還有什么生命存在? 三十年前,我們只知道九大行星。 如今,我們知道附近有數千顆恆星在沿著軌道運行著。 在本課程中,學生將學習系外行星的知識,哪些可能是庇護生命的最佳選擇,以及為什麼這些行星最受關注。該課程將天文學和生物學的概念相結合乃少有前例,這堂導論在如今這個天文生物學領域中最有趣的時代之一是極精彩的。
★★★★★★★★★★★★
4. Leaders of Learning 學習的領導者
https://www.edx.org/course/leaders-of-learning
How do you learn? Why do you learn? Can you name three people who would share your answers? In this class, students will identify their own style of learning and find out how that style fits into the ever-changing landscape of education. Later lectures focus on how to apply that knowledge to leadership, organizational structure, and the future of learning.
你如何學習? 你為什麼要學習? 你能說出三個可以分享答案的人嗎? 在本課程中,學生將辨認自己的學習風格,並了解該風格如何適應不斷變化的教育環境。 後段課程聚焦於如何將這些知識應用於領導力、組織結構和未來。
★★★★★★★★★★★★
5. Using Python for Research 運用Python於研究
https://www.edx.org/course/using-python-for-research
Do you want to learn to code, and then learn how to actually use it? In this course, students will review the basics of the Python coding language and then learn how to apply that knowledge to research projects by means of tools such as NumPy and SciPy. This class is an intermediate level course, and a basic understanding of the Python language is ideal before beginning.
你想學習編碼,然後學習如何實際使用它嗎?在本課程中,學生將回顧Python編碼語言的基礎知識,然後學習如何通過NumPy和SciPy等工具將這些知識應用於研究計畫。 該課程是中級課程,在上課之前對Python語言有基本的了解為佳。
★★★★★★★★★★★★
6. American Government 美國政府
https://www.edx.org/xseries/harvardx-us-government
The federal government of the United States can seem like a far off and alien system, one which acts in strange ways; but it is a powerful force in the life of every American. To not understand how it works, and your place in it as a citizen and voter, is to be an irresponsible citizen. This course introduces students to the function, history, institutions, and inner workings of American government. No previous study or understanding of American politics is required, making the course ideal for non-American students who want to understand what exactly is going on there.
美國聯邦政府看起來像個運作方式奇特,遙不可及的陌生體系。 但在每個美國人生活中這是一股強大的力量。 如果不了解它是如何運作的,以及自己作為公民和選民在其中所處的位置,會成為不負責任的公民。 本課程向學生介紹美國政府的職能、歷史、機構及其內部運作。 無需對美國政治的事前學習與了解,使該課程成為想要了解美國到底發生了什麼的非美國學生的理想選擇。
★★★★★★★★★★★★
7. Humanitarian Response to Conflict and Disaster 人道主義對衝突與災難的應對
https://www.edx.org/course/humanitarian-response-to-conflict-and-disaster
We live in a world with staggering humanitarian crises, and responses to them that are often lacking. In this class, students will ask questions on how to deal with humanitarian disasters through the case studies of Zaire, Syria, The Balkans, and elsewhere. The history of humanitarian responses, and the frameworks that those responses past and present operate in, will be covered as well, and students will be challenged to ask if they remain sufficient.
我們生活在充滿令人震驚的人道主義危機的世界中,而對這些危機往往缺乏應對。 在本課程中,學生將通過薩伊、敘利亞、巴爾幹地區和其他地區的案例研究,提出有關如何應對人道主義災難的問題。本課程還將涵蓋人道主義應對的歷史以及過去與現在的應對所運行的框架,並且挑戰學生去提出這些應對是否足夠。
★★★★★★★★★★★★
美國名校的免費線上課程 (MOOCs)
https://bit.ly/2Um51WO
英國名校MOOC平台
https://bit.ly/3eYUOYe
留學獎學金: https://bit.ly/3e9vrT0
★★★★★★★★★★★★
英文資料來源: https://bit.ly/2Y7p1gR
圖片來源: https://bit.ly/2UipYC2
★★★★★★★★★★★★
教育時評:http://bit.ly/39ABON9
while python 在 prasertcbs Youtube 的評價
ดาวน์โหลดไฟล์ตัวอย่างได้ที่ https://goo.gl/hrJuA4
เชิญสมัครเป็นสมาชิกของช่องนี้ได้ที่ ► https://www.youtube.com/subscription_center?add_user=prasertcbs
playlist สอนภาษาไพธอน Python เบื้องต้น ► https://www.youtube.com/watch?v=DI7eca5Kzdc&list=PLoTScYm9O0GH4YQs9t4tf2RIYolHt_YwW
playlist สอนภาษาไพธอน Python การเขียนโปรแกรมเชิงวัตถุ (OOP: Object-Oriented Programming) ► https://www.youtube.com/watch?v=4bVBSluxJNI&list=PLoTScYm9O0GF_wbU-7layLaSuHjzhIRc9
playlist สอน Python 3 GUI ► https://www.youtube.com/playlist?list=PLoTScYm9O0GFB1Y3cCmb9aPD5xRB1T11y
playlist สอนภาษา C++ เบื้องต้น ► https://www.youtube.com/watch?v=_NHyJBIxc40&list=PLoTScYm9O0GEfZwqM2KyCBcPTVsc6cU_i
playlist สอนภาษา C เบื้องต้น ► https://www.youtube.com/watch?v=Z_u8Nh_Zlqc&list=PLoTScYm9O0GHHgz0S1tSyIl7vkG0y105z
playlist สอนภาษา C# เบื้องต้น ► https://www.youtube.com/watch?v=hhl49jwOIZI&list=PLoTScYm9O0GE4trr-XPozJRwaY7V9hx8K
playlist สอนภาษาจาวา Java เบื้องต้น ► https://www.youtube.com/watch?v=O3rW9JvADfU&list=PLoTScYm9O0GF26yW0zVc2rzjkygafsILN
playlist สอนการทำ Unit Test ภาษาจาวา Java ► https://www.youtube.com/watch?v=R11yg8hKApU&list=PLoTScYm9O0GHiK3KNdH_PrNB0G3-kb1Bi
playlist สอนภาษา R เบื้องต้น ► https://www.youtube.com/watch?v=oy4qViQLXsI&list=PLoTScYm9O0GF6qjrRuZFSHdnBXD2KVICp
playlist สอนภาษา PHP เบื้องต้น ► https://www.youtube.com/watch?v=zlRDiXjYVo4&list=PLoTScYm9O0GH_6LARFxozL_viEsXV2wgO

while python 在 Kento Bento Youtube 的評價
Get ‘Asiany’ Merch at our new merch store!: https://standard.tv/kentobento
Support us on Patreon: https://patreon.com/kentobento
★ Next TOP 10 WEIRD Asian News of the Month:
https://youtu.be/5idlQMo0edQ
★ The Asian Accent Test: https://youtu.be/xiWmdWXYle8
★ Asian Stereotypes Checklist: https://youtu.be/hrJbxLu9MiE
★ 5 RACIST Asian Commercials That May Shock You: https://youtu.be/P2ByYFMXDtI
★ 10 REASONS Why Asians Don't Get FAT: https://youtu.be/xIqJR6xfMro
★ 30 RACIST Asian Slurs That May Piss You Off: https://youtu.be/6tHs9wrqiPY
Available Subtitles: ENGLISH
► If you want to help subtitle this video into your native language, please let us know so we can give you credit~ http://www.youtube.com/timedtext_video?ref=share&v=GieYsvPNJVM
We talk about the top 10 weird Asian news of the month, in no particular order.
1. KFC Hong Kong Releases Fried-Chicken Flavoured Nail Polish
- Check out our video reaction to the weird KFC Fried Chicken Nail Polish Commercial: https://youtu.be/WPLcej9D-oM
2. Japanese Book About Cats In Sexy Poses
3. Chinese Girl Eats Corn With A Drill And Has An Accident
4. Coca Cola Japan Releases Sleep Water
5. An Indian Baby Has A Penis The Size Of An Adults
6. Most Racist Chinese Commercial
7. Japan’s First Naked Restaurant Doesn’t Allow Fat People
8. A Snake Bit A Thai Man’s Penis While On A Toilet
- Check out the actual python in the toilet footage from Thailand as well as hear Nina talk about poo: https://youtu.be/f_DEB2FjDyA
9. The Chinese Coin Wrist Challenge
10. Japanese High School Students Hatch A Chick Without An Egg
Thanks for watching! And if you enjoyed this video, don't forget to LIKE, SHARE & SUBSCRIBE ^^
SOCIAL MEDIA
Follow us on Twitter: https://twitter.com/kentobento2015
Like us on Facebook: https://www.facebook.com/kentobento2015
Tags: asian stereotypes amwf couples asian boyfriend japanese high school students chinese korean asian guys white girls

while python 在 prasertcbs Youtube 的評價
ดาวน์โหลดไฟล์ตัวอย่างได้ที่ https://goo.gl/K2Y12j
เชิญสมัครเป็นสมาชิกของช่องนี้ได้ที่ ► https://www.youtube.com/subscription_center?add_user=prasertcbs
playlist สอนภาษา C เบื้องต้น ► https://www.youtube.com/watch?v=Z_u8Nh_Zlqc&list=PLoTScYm9O0GHHgz0S1tSyIl7vkG0y105z
playlist สอนภาษา C++ เบื้องต้น ► https://www.youtube.com/watch?v=_NHyJBIxc40&list=PLoTScYm9O0GEfZwqM2KyCBcPTVsc6cU_i
playlist สอนภาษา C# เบื้องต้น ► https://www.youtube.com/watch?v=hhl49jwOIZI&list=PLoTScYm9O0GE4trr-XPozJRwaY7V9hx8K
playlist สอนภาษาจาวา Java เบื้องต้น ► https://www.youtube.com/watch?v=O3rW9JvADfU&list=PLoTScYm9O0GF26yW0zVc2rzjkygafsILN
playlist สอนการทำ Unit Test ภาษาจาวา Java ► https://www.youtube.com/watch?v=R11yg8hKApU&list=PLoTScYm9O0GHiK3KNdH_PrNB0G3-kb1Bi
playlist สอนภาษาไพธอน Python เบื้องต้น ► https://www.youtube.com/watch?v=DI7eca5Kzdc&list=PLoTScYm9O0GH4YQs9t4tf2RIYolHt_YwW
playlist สอนภาษาไพธอน Python การเขียนโปรแกรมเชิงวัตถุ (OOP: Object-Oriented Programming) ► https://www.youtube.com/watch?v=4bVBSluxJNI&list=PLoTScYm9O0GF_wbU-7layLaSuHjzhIRc9
playlist สอนภาษา R เบื้องต้น ► https://www.youtube.com/watch?v=oy4qViQLXsI&list=PLoTScYm9O0GF6qjrRuZFSHdnBXD2KVICp
playlist สอนภาษา PHP เบื้องต้น ► https://www.youtube.com/watch?v=zlRDiXjYVo4&list=PLoTScYm9O0GH_6LARFxozL_viEsXV2wgO

while python 在 While迴圈- 輕鬆學Python 3 零基礎彩色圖解、專業入門 的相關結果
While 迴圈 ... Python程式語言總共有二種迴圈的語法。第一種是For迴圈,我們已經在前面單元介紹過它的用法,而且也用For迴圈完成了許多程式。這個單元我們要介紹第二種迴圈, ... ... <看更多>
while python 在 Python While 循环语句 - 菜鸟教程 的相關結果
Python While 循环语句Python 编程中while 语句用于循环执行程序,即在某条件下,循环执行某段程序,以处理需要重复处理的相同任务。其基本形式为: while 判断 ... ... <看更多>
while python 在 Python while 迴圈(loop)基本認識與3種操作 - 自學成功道 的相關結果
Python while 迴圈(loop)基本認識與3種操作 · 使用break跳出迴圈 · 使用else讓你知道while迴圈停止了 · 使用continue跳過這次,並繼續下一個迴圈. ... <看更多>