<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2105061709215843737</id><updated>2026-07-29T16:53:00.408-07:00</updated><category term="EFI/UEFI Shell 指令集"/><category term="Serial ATA commands"/><category term="程式設計"/><category term="EFI/UEFI開發工具"/><category term="EFI/UEFI開發設計"/><category term="Vocabulary"/><category term="財經詞彙"/><category term="Linux相關"/><category term="Serial ATA Advanced Host Controller Interface (AHCI)"/><category term="BIOS相關"/><category term="C"/><category term="C語言"/><category term="EFI/UEFI Hii(Human Interface Infrstructure)"/><category term="EFI/UEFI Secure Boot"/><category term="SPI Flash Chip Commands List"/><category term="Visual Forms Representation(VFR)"/><category term="印度數學"/><category term="BIOS Int1Ah"/><category term="Linux Shell 指令"/><category term="BIOS Int13h"/><category term="SCSI"/><category term="MAC相關"/><category term="Master Bootstrap Loader(MBR)"/><category term="Windows相關"/><category term="小技巧"/><category term="ATA Trusted Commands"/><category term="ARM相關"/><category term="Android相關"/><category term="EFI/UEFI Function Library"/><category term="Excel VBA 程式範例"/><category term="Serial Attached SCSI"/><category term="喇哩喇雜"/><category term="Assembler"/><category term="GUID Partition Table(GPT)"/><category term="boot loader"/><category term="亞斯伯格相關"/><category term="I2C相關"/><category term="Installation"/><category term="Micro Processor"/><category term="NVME"/><category term="Rust"/><category term="SVN(Subversion)版本控制系統介紹"/><title type='text'>野山羊隨手記錄</title><subtitle type='html'>Easily record notes and simply write down random things.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>444</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-2056245887985883983</id><published>2025-11-30T23:38:00.000-08:00</published><updated>2025-11-30T23:48:40.760-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Rust"/><title type='text'>Rust: triangles from smallest/largest to largest/smallest</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 19px;&quot;&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #569cd6; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace;&quot;&gt;fn&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #c8c8c8; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace;&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace;&quot;&gt;() {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt; &amp;nbsp; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;println!&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;triangles from smallest to largest&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;mut&lt;/span&gt; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count0&lt;/span&gt; = &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;mut&lt;/span&gt; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count1&lt;/span&gt; = &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;loop&lt;/span&gt; {&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;loop&lt;/span&gt; {&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count0&lt;/span&gt; &amp;gt;= &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count1&lt;/span&gt; {&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;break&lt;/span&gt;; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6a9955;&quot;&gt;// exit loop&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;print!&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;*&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count0&lt;/span&gt; += &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count1&lt;/span&gt; &amp;gt;= &lt;span style=&quot;color: #b5cea8;&quot;&gt;5&lt;/span&gt; {&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;break&lt;/span&gt;; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6a9955;&quot;&gt;// exit loop&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;println!&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count1&lt;/span&gt; += &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count0&lt;/span&gt; = &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;triangles from smallest to largest
*
**
***
****
*****&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span&gt;&lt;div style=&quot;line-height: 19px;&quot;&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;fn&lt;/span&gt; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;main&lt;/span&gt;() {&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;println!&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;triangles from largest to smallest&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;mut&lt;/span&gt; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count0&lt;/span&gt; = &lt;span style=&quot;color: #b5cea8;&quot;&gt;5&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;mut&lt;/span&gt; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count1&lt;/span&gt; = &lt;span style=&quot;color: #b5cea8;&quot;&gt;5&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;loop&lt;/span&gt; {&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;loop&lt;/span&gt; {&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count0&lt;/span&gt; &amp;lt;= &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt; {&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;break&lt;/span&gt;; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6a9955;&quot;&gt;// exitloop&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;print!&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;*&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count0&lt;/span&gt; -= &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count1&lt;/span&gt; &amp;lt;= &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt; {&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;break&lt;/span&gt;; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6a9955;&quot;&gt;// exit loop&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;println!&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count1&lt;/span&gt; -= &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count0&lt;/span&gt; = &lt;span style=&quot;color: #c8c8c8;&quot;&gt;count1&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;div style=&quot;line-height: 19px;&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 19px;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;triangles from largest to smallest
*****
****
***
**
*&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 19px;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/2056245887985883983/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2025/11/rust-triangles-from-smallest-to-largest.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/2056245887985883983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/2056245887985883983'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2025/11/rust-triangles-from-smallest-to-largest.html' title='Rust: triangles from smallest/largest to largest/smallest'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-3571255084319414276</id><published>2025-11-09T20:35:00.000-08:00</published><updated>2025-11-09T20:35:48.718-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>找右邊算來第一個1的bit位置</title><content type='html'>&lt;p&gt;&amp;nbsp;#include &amp;lt;stdio.h&amp;gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;int calculate_first_one_in_left(unsigned int n)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; int start = 0, shift_r_num = 0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; while(1)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (n == 0) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shift_r_num = (start == 0) ? -1 : (shift_r_num - 1) ;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; start = 1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n &amp;gt;&amp;gt;= 1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shift_r_num ++;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return shift_r_num;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;int main()&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; unsigned int n=0x1100;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; printf (&quot;n=0x%x, %d\n&quot;, n, calculate_first_one_in_left(n));&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; n=0x100;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; printf (&quot;n=0x%x, %d\n&quot;, n, calculate_first_one_in_left(n));&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; n=0x10;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; printf (&quot;n=0x%x, %d\n&quot;, n, calculate_first_one_in_left(n));&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; n=0x1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; printf (&quot;n=0x%x, %d\n&quot;, n, calculate_first_one_in_left(n));&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;[Output]&lt;/p&gt;&lt;p&gt;n=0x1100, 12&lt;/p&gt;&lt;p&gt;n=0x100, 8&lt;/p&gt;&lt;p&gt;n=0x10, 4&lt;/p&gt;&lt;p&gt;n=0x1, 0&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/3571255084319414276/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2025/11/1bit.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/3571255084319414276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/3571255084319414276'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2025/11/1bit.html' title='找右邊算來第一個1的bit位置'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-677544029196820065</id><published>2024-07-01T07:48:00.000-07:00</published><updated>2024-07-01T07:48:54.799-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>有2、3、4、5、6個數字，能組成多少種互不相等且並無重複這幾個數字的四位數數字，共有多少個?</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #111519; color: #017c9d; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: #111519; color: white; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #111519; color: #15b8ae; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #111519; color: white; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #017c9d;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;int&lt;/span&gt; i, total;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; total &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;for&lt;/span&gt; (i &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;10000&lt;/span&gt;; i&lt;span style=&quot;color: #017c9d;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;if&lt;/span&gt; (&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (((i &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1000&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;2&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; ((i &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1000&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;6&lt;/span&gt;)) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (((i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1000&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;100&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;2&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; ((i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1000&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;100&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;6&lt;/span&gt;)) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (((i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;100&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;10&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;2&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; ((i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;100&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;10&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;6&lt;/span&gt;)) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (((i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;10&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;2&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; ((i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;10&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;6&lt;/span&gt;)) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((i &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1000&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;!=&lt;/span&gt; (i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1000&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;100&lt;/span&gt;)) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((i &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1000&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;!=&lt;/span&gt; (i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;100&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;10&lt;/span&gt;)) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((i &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1000&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;!=&lt;/span&gt; (i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;10&lt;/span&gt;)) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1000&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;100&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;!=&lt;/span&gt; (i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;100&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;10&lt;/span&gt;)) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1000&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;100&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;!=&lt;/span&gt; (i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;10&lt;/span&gt;)) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;100&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;10&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;!=&lt;/span&gt; (i &lt;span style=&quot;color: #017c9d;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;10&lt;/span&gt;)) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;span style=&quot;color: #15b8ae;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #60778c;&quot;&gt;// printf(&quot;i=%d\n&quot;, i);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total&lt;span style=&quot;color: #017c9d;&quot;&gt;++&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #15b8ae;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;total=&lt;/span&gt;&lt;span style=&quot;color: #019d76;&quot;&gt;%d\n&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&lt;/span&gt;, total);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;[output] : total &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;120&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/677544029196820065/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/07/23456.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/677544029196820065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/677544029196820065'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/07/23456.html' title='有2、3、4、5、6個數字，能組成多少種互不相等且並無重複這幾個數字的四位數數字，共有多少個?'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-7180437571215688296</id><published>2024-07-01T03:18:00.000-07:00</published><updated>2024-07-01T03:21:30.206-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>將字串反向列印, 並做位置對調</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #111519; color: #017c9d; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: #111519; color: white; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #111519; color: #15b8ae; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #111519; color: white; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #017c9d;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;swap_str&lt;/span&gt;(&lt;span style=&quot;color: #017c9d;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;*&lt;/span&gt;str)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;int&lt;/span&gt; i, tmp, max;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; i &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;while&lt;/span&gt; (str[i] &lt;span style=&quot;color: #017c9d;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: #019d76;&quot;&gt;\0&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&#39;&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i&lt;span style=&quot;color: #017c9d;&quot;&gt;++&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; max &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; i;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;for&lt;/span&gt; (i &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;lt;&lt;/span&gt; (max &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1&lt;/span&gt;); i&lt;span style=&quot;color: #017c9d;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmp &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; str[i];&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; str[i] &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; str[max &lt;span style=&quot;color: #017c9d;&quot;&gt;-&lt;/span&gt; i &lt;span style=&quot;color: #017c9d;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1&lt;/span&gt;];&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; str[max &lt;span style=&quot;color: #017c9d;&quot;&gt;-&lt;/span&gt; i &lt;span style=&quot;color: #017c9d;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; tmp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;return&lt;/span&gt; str;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #017c9d;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;char&lt;/span&gt; str1&lt;span style=&quot;color: #019d76;&quot;&gt;[]&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;char&lt;/span&gt; str2&lt;span style=&quot;color: #019d76;&quot;&gt;[]&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;9876543210&quot;&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #15b8ae;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #019d76;&quot;&gt;%s\n&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&lt;/span&gt;, str1);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #15b8ae;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #019d76;&quot;&gt;%s\n&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #15b8ae;&quot;&gt;swap_str&lt;/span&gt;(str1));&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #15b8ae;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #019d76;&quot;&gt;%s\n&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&lt;/span&gt;, str2);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #15b8ae;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #019d76;&quot;&gt;%s\n&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #15b8ae;&quot;&gt;swap_str&lt;/span&gt;(str2));&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;[output]:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #017c9d;&quot;&gt;=&amp;gt;&lt;/span&gt;ZYXWVUTSRQPONMLKJIHGFEDCBA&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;9876543210&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #017c9d;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;0123456789&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/7180437571215688296/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/07/swapstr.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/7180437571215688296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/7180437571215688296'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/07/swapstr.html' title='將字串反向列印, 並做位置對調'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-26909549081471797</id><published>2024-07-01T02:59:00.000-07:00</published><updated>2024-07-01T02:59:17.113-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>簡單的將字串反向列印, 不做位置對調</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #111519; color: #017c9d; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: #111519; color: white; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #111519; color: #15b8ae; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #111519; color: white; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #017c9d;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #017c9d;&quot;&gt;*&lt;/span&gt;str &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #60778c;&quot;&gt;// char *str = &quot;9876543210&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;int&lt;/span&gt; i, max;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; i &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;while&lt;/span&gt; (str[i] &lt;span style=&quot;color: #017c9d;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: #019d76;&quot;&gt;\0&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&#39;&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i&lt;span style=&quot;color: #017c9d;&quot;&gt;++&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; max &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; i;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #15b8ae;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #019d76;&quot;&gt;%s\n&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&lt;/span&gt;, str);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #15b8ae;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;=&amp;gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;for&lt;/span&gt; (i &lt;span style=&quot;color: #017c9d;&quot;&gt;=&lt;/span&gt; max &lt;span style=&quot;color: #017c9d;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;1&lt;/span&gt;; i &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #017c9d;&quot;&gt;--&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;if&lt;/span&gt; (str[i] &lt;span style=&quot;color: #017c9d;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: #019d76;&quot;&gt;\0&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&#39;&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #15b8ae;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #019d76;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&lt;/span&gt;, str[i]);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;if&lt;/span&gt; ((i &lt;span style=&quot;color: #017c9d;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;0&lt;/span&gt;) &lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (str[i] &lt;span style=&quot;color: #017c9d;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: #019d76;&quot;&gt;\0&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&#39;&lt;/span&gt;))&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #15b8ae;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #019d76;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&quot;&lt;/span&gt;, str[i]);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #017c9d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #15b8ae;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;line-height: 19px;&quot;&gt;&lt;div&gt;[output]:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;ABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #017c9d;&quot;&gt;=&amp;gt;&lt;/span&gt;ZYXWVUTSRQPONMLKJIHGFEDCBA&lt;/div&gt;&lt;br /&gt;&lt;div&gt;[output]:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #017c9d;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;9876543210&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #017c9d;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;0123456789&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #15b8ae;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/26909549081471797/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/07/blog-post_1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/26909549081471797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/26909549081471797'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/07/blog-post_1.html' title='簡單的將字串反向列印, 不做位置對調'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-7354984051992811911</id><published>2024-07-01T01:09:00.000-07:00</published><updated>2024-07-01T01:09:14.133-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>Function pointer and type define</title><content type='html'>&lt;div style=&quot;background-color: #0e1114; color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;#include&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;test_fun1&lt;/span&gt;(&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;input&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;tmp&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%s&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;)...&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, __FUNCTION__, &lt;span style=&quot;color: #bed0e2;&quot;&gt;input&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;tmp&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;test_fun2&lt;/span&gt;(&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;input&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;tmp&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%s&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;)***&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, __FUNCTION__, &lt;span style=&quot;color: #bed0e2;&quot;&gt;input&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;tmp&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #64778a;&quot;&gt;typedef&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;void&lt;/span&gt; (&lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;function_ptr&lt;/span&gt;)(&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6ba77f;&quot;&gt;function_ptr&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;op_fun&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;void&lt;/span&gt; (&lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;fun_ptr&lt;/span&gt;)(&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;fun_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;test_fun1&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;fun_ptr&lt;/span&gt;(&lt;span style=&quot;color: #61bcc6;&quot;&gt;2&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;3&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;fun_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;test_fun2&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;fun_ptr&lt;/span&gt;(&lt;span style=&quot;color: #61bcc6;&quot;&gt;7&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;6&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;-------&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;op_fun&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;test_fun1&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;op_fun&lt;/span&gt;(&lt;span style=&quot;color: #61bcc6;&quot;&gt;77&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;11&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;-------&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #0e1114; color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[Output]:&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;line-height: 19px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #e6eaef;&quot;&gt;test_fun1&lt;/span&gt;(&lt;span style=&quot;color: #61bcc6;&quot;&gt;2&lt;/span&gt;)..&lt;span style=&quot;color: #61bcc6;&quot;&gt;.3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #e6eaef;&quot;&gt;test_fun2&lt;/span&gt;(&lt;span style=&quot;color: #61bcc6;&quot;&gt;7&lt;/span&gt;)&lt;span style=&quot;color: #228a96;&quot;&gt;***&lt;/span&gt;&lt;span style=&quot;color: #61bcc6;&quot;&gt;6&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;-------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #e6eaef;&quot;&gt;test_fun1&lt;/span&gt;(&lt;span style=&quot;color: #61bcc6;&quot;&gt;77&lt;/span&gt;)..&lt;span style=&quot;color: #61bcc6;&quot;&gt;.11&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;-------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/7354984051992811911/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/07/function-pointer-and-type-define.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/7354984051992811911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/7354984051992811911'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/07/function-pointer-and-type-define.html' title='Function pointer and type define'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-8746556067840266277</id><published>2024-07-01T00:42:00.000-07:00</published><updated>2024-07-01T00:42:50.996-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>用數字劃出菱形由小（邊）至大（中心）</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #0e1114; color: #228a96; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #addbbc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #0e1114; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;draw_triangle_fun&lt;/span&gt;(&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;space&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&#39; &#39;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;space&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&#39;0&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #44515e;&quot;&gt;// for (t_l = 0; t_l &amp;lt;= t_w; t_l++)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&#39;0&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;space&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;); &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&#39;0&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #44515e;&quot;&gt;// for (t_l = 0; t_l &amp;lt; (length - t_w); t_l++)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;); &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;--&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #44515e;&quot;&gt;// ch = (length - t_l) + &#39;0&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (((&lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&#39;0&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;Please enter length/width(1 ~ 9):&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;9&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;9&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;draw_triangle_fun&lt;/span&gt;(&lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;Please enter length/width(1 ~ 9):9

=============================================
         0
        010
       01210
      0123210
     012343210
    01234543210
   0123456543210
  012345676543210
 01234567876543210
0123456789876543210
 01234567876543210
  012345676543210
   0123456543210
    01234543210
     012343210
      0123210
       01210
        010
         0

=============================================&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/8746556067840266277/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/07/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/8746556067840266277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/8746556067840266277'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/07/blog-post.html' title='用數字劃出菱形由小（邊）至大（中心）'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-2334938182147832461</id><published>2024-06-30T23:51:00.000-07:00</published><updated>2024-06-30T23:51:47.591-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>用數字劃出三角形</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #0e1114; color: #228a96; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #addbbc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #0e1114; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;draw_triangle_fun&lt;/span&gt;(&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;space&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&#39; &#39;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;); &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&#39;0&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&#39;0&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;space&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&#39;0&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;space&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&#39;0&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;Please enter length/width(1 ~ 9):&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;9&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;9&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;draw_triangle_fun&lt;/span&gt;(&lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;Please enter length/width(1 ~ 9):9

=============================================
0123456789
012345678
01234567
0123456
012345
01234
0123
012
01
0
0
01
012
0123
01234
012345
0123456
01234567
012345678
0123456789
          0
         01
        012
       0123
      01234
     012345
    0123456
   01234567
  012345678
 0123456789
 0123456789
  012345678
   01234567
    0123456
     012345
      01234
       0123
        012
         01
          0

=============================================&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/2334938182147832461/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_69.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/2334938182147832461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/2334938182147832461'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_69.html' title='用數字劃出三角形'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-5107476382722798805</id><published>2024-06-30T19:54:00.000-07:00</published><updated>2024-06-30T21:07:28.079-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>數字排序 由大到小與由小到大 排列</title><content type='html'>&lt;div style=&quot;background-color: #0e1114; color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;#include&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;#define&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;10&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;tmp&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;test_case0&lt;/span&gt;[&lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt;] &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; {&lt;span style=&quot;color: #61bcc6;&quot;&gt;13&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #61bcc6;&quot;&gt;5&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;7&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;79&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;213&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;5&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;132&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #61bcc6;&quot;&gt;53&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;71&lt;/span&gt;};&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;test_case1&lt;/span&gt;[&lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt;] &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; {&lt;span style=&quot;color: #61bcc6;&quot;&gt;91&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;65&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #61bcc6;&quot;&gt;12&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;78&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #61bcc6;&quot;&gt;9&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #61bcc6;&quot;&gt;312&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;5&lt;/span&gt;, &lt;span style=&quot;color: #61bcc6;&quot;&gt;132&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #61bcc6;&quot;&gt;121&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #61bcc6;&quot;&gt;9&lt;/span&gt;};&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;==================Original===================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;test_case0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt; &quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;]);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;========Arrange from large to small=========&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #44515e;&quot;&gt;//-------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;test_case0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i + 1&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;] &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt;])&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;tmp&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;];&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;] &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt;];&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt;] &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;tmp&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #44515e;&quot;&gt;//-------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;]);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot; &amp;gt; &quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;==================Original===================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;test_case1&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt; &quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;]);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;========Arrange from small to large=========&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #44515e;&quot;&gt;//-------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;test_case1&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i + 1&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;] &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt;])&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;tmp&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;];&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;] &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt;];&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;j&lt;/span&gt;] &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;tmp&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #44515e;&quot;&gt;//-------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;members&lt;/span&gt;[&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;]);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;MAX_NUM&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot; &amp;lt; &quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #0e1114; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;==================Original===================
13 -5 0 7 79 213 5 132 -53 71 
========Arrange from large to small=========
213 &amp;gt; 132 &amp;gt; 79 &amp;gt; 71 &amp;gt; 13 &amp;gt; 7 &amp;gt; 5 &amp;gt; 0 &amp;gt; -5 &amp;gt; -53
==================Original===================
91 65 -12 78 -9 -312 5 132 -121 -9 
========Arrange from small to large=========
-312 &amp;lt; -121 &amp;lt; -12 &amp;lt; -9 &amp;lt; -9 &amp;lt; 5 &amp;lt; 65 &amp;lt; 78 &amp;lt; 91 &amp;lt; 132
=============================================&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #0e1114; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/5107476382722798805/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_30.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/5107476382722798805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/5107476382722798805'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_30.html' title='數字排序 由大到小與由小到大 排列'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-3555969304669819898</id><published>2024-06-30T05:47:00.000-07:00</published><updated>2024-06-30T05:47:52.058-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>開根號小數點後精度兩位數</title><content type='html'>&lt;div style=&quot;background-color: #0e1114; color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;#include&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;square_root_fun&lt;/span&gt;(&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;value&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;after_dec_point_ptr&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;after_dec_point_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #6ba77f;&quot;&gt;NULL&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;after_dec_point_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;value&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;*=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;10000&lt;/span&gt;;&lt;span style=&quot;color: #44515e;&quot;&gt; // Magnification 10000 times&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;31&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;--&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt; (&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt;))&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;); &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;--&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;=&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;|&lt;/span&gt; (&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;)) &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;|&lt;/span&gt; (&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;))))&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;|=&lt;/span&gt; (&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;=&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;|&lt;/span&gt; (&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;)) &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;|&lt;/span&gt; (&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;))))&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;|=&lt;/span&gt; (&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;after_dec_point_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #6ba77f;&quot;&gt;NULL&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;after_dec_point_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;100&lt;/span&gt;;&lt;span style=&quot;color: #44515e;&quot;&gt; // Restore magnification and Storage position after decimal point&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;/=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;100&lt;/span&gt;;&lt;span style=&quot;color: #44515e;&quot;&gt; // Restore magnification&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;after_dec_point_ptr&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;Please input a value:&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;square_root_fun&lt;/span&gt;(&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;after_dec_point_ptr&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt; square root is &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;root&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;after_dec_point_ptr&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;line-height: 19px;&quot;&gt;&lt;div&gt;Please &lt;span style=&quot;color: #bed0e2;&quot;&gt;input&lt;/span&gt; a value:&lt;span style=&quot;color: #61bcc6;&quot;&gt;123456&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;=============================================&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #61bcc6;&quot;&gt;123456&lt;/span&gt; square root is &lt;span style=&quot;color: #61bcc6;&quot;&gt;351.36&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;=============================================&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Please input a value:&lt;span style=&quot;color: #61bcc6;&quot;&gt;2345&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;=============================================&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #61bcc6;&quot;&gt;2345&lt;/span&gt; square root is &lt;span style=&quot;color: #61bcc6;&quot;&gt;48.42&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;=============================================&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Please input a value:&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;=============================================&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; square root is &lt;span style=&quot;color: #61bcc6;&quot;&gt;1.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;=============================================&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Please input a value:&lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;=============================================&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt; square root is &lt;span style=&quot;color: #61bcc6;&quot;&gt;0.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;=============================================&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/3555969304669819898/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/06/c.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/3555969304669819898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/3555969304669819898'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/06/c.html' title='開根號小數點後精度兩位數'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-2273536006269639183</id><published>2024-06-29T02:08:00.000-07:00</published><updated>2024-06-29T02:08:10.331-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>用減法與位移做除法並取餘數</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #0e1114; color: #228a96; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #addbbc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #0e1114; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;division_fun&lt;/span&gt;(&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;dividend&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;divisor&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;remainder_ptr&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;quotient&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;dividend&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;||&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;divisor&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;||&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;dividend&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;divisor&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;||&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;remainder_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #6ba77f;&quot;&gt;NULL&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;dividend&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;divisor&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;remainder_ptr&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;remainder_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;dividend&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;31&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;--&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;dividend&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt; (&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;remainder_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;dividend&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;quotient&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;--&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;remainder_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;=&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;divisor&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;remainder_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-=&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;divisor&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;quotient&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;|=&lt;/span&gt; (&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (&lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;remainder_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;=&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;divisor&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;)))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;remainder_ptr&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-=&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;divisor&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;quotient&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;|=&lt;/span&gt; (&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;quotient&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;quotient&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;remainder&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;Please input a and b values:&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;quotient&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;division_fun&lt;/span&gt;(&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;remainder&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt; / &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;quotient&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;remainder&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;
Please input a and b values:123 3

=============================================
123 / 3 = 41...0
=============================================&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;div&gt;Please input a and b values:12345&lt;/div&gt;&lt;div&gt;132&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;=============================================&lt;/div&gt;&lt;div&gt;12345 / 132 = 93...69&lt;/div&gt;&lt;div&gt;=============================================&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/2273536006269639183/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_74.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/2273536006269639183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/2273536006269639183'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_74.html' title='用減法與位移做除法並取餘數'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-7072922716785804572</id><published>2024-06-29T01:05:00.000-07:00</published><updated>2024-06-29T01:06:46.638-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>只用加法與位移做出乘法</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #0e1114; color: #228a96; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #addbbc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #0e1114; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;multiplier_fun&lt;/span&gt;(&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;mulcand&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;mul&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;total&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;mulcand&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;||&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;mul&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;31&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;--&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;mul&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt; (&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;total&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;max_num&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;mul&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt; (&lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;total&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;+=&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;mulcand&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;total&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;Please input a and b values:&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt; x &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;, &lt;span style=&quot;color: #e6eaef;&quot;&gt;multiplier_fun&lt;/span&gt;(&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;));&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;
Please input a and b values:9 19

=============================================
9 x 19 = 171
=============================================&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please input a and b values:3 133&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;=============================================&lt;/div&gt;&lt;div&gt;3 x 133 = 399&lt;/div&gt;&lt;div&gt;=============================================&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/7072922716785804572/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_63.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/7072922716785804572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/7072922716785804572'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_63.html' title='只用加法與位移做出乘法'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-7222514659732379709</id><published>2024-06-29T00:13:00.000-07:00</published><updated>2024-06-29T00:13:16.003-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>用*號字元劃出三角形</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #0e1114; color: #228a96; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #addbbc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #0e1114; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;draw_triangle_fun&lt;/span&gt;(&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;space&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&#39; &#39;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #addbbc;&quot;&gt;&#39;*&#39;&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;space&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;space&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_w&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;t_l&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%c&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;ch&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;Please enter length and width:&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;draw_triangle_fun&lt;/span&gt;(&lt;span style=&quot;color: #bed0e2;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;width&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;
Please enter length and width:7 7

=============================================
*******
******
*****
****
***
**
*
*
**
***
****
*****
******
*******
      *
     **
    ***
   ****
  *****
 ******
*******
*******
 ******
  *****
   ****
    ***
     **
      *

=============================================&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;div&gt;Please enter length and width:20 20&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;=============================================&lt;/div&gt;&lt;div&gt;********************&lt;/div&gt;&lt;div&gt;*******************&lt;/div&gt;&lt;div&gt;******************&lt;/div&gt;&lt;div&gt;*****************&lt;/div&gt;&lt;div&gt;****************&lt;/div&gt;&lt;div&gt;***************&lt;/div&gt;&lt;div&gt;**************&lt;/div&gt;&lt;div&gt;*************&lt;/div&gt;&lt;div&gt;************&lt;/div&gt;&lt;div&gt;***********&lt;/div&gt;&lt;div&gt;**********&lt;/div&gt;&lt;div&gt;*********&lt;/div&gt;&lt;div&gt;********&lt;/div&gt;&lt;div&gt;*******&lt;/div&gt;&lt;div&gt;******&lt;/div&gt;&lt;div&gt;*****&lt;/div&gt;&lt;div&gt;****&lt;/div&gt;&lt;div&gt;***&lt;/div&gt;&lt;div&gt;**&lt;/div&gt;&lt;div&gt;*&lt;/div&gt;&lt;div&gt;*&lt;/div&gt;&lt;div&gt;**&lt;/div&gt;&lt;div&gt;***&lt;/div&gt;&lt;div&gt;****&lt;/div&gt;&lt;div&gt;*****&lt;/div&gt;&lt;div&gt;******&lt;/div&gt;&lt;div&gt;*******&lt;/div&gt;&lt;div&gt;********&lt;/div&gt;&lt;div&gt;*********&lt;/div&gt;&lt;div&gt;**********&lt;/div&gt;&lt;div&gt;***********&lt;/div&gt;&lt;div&gt;************&lt;/div&gt;&lt;div&gt;*************&lt;/div&gt;&lt;div&gt;**************&lt;/div&gt;&lt;div&gt;***************&lt;/div&gt;&lt;div&gt;****************&lt;/div&gt;&lt;div&gt;*****************&lt;/div&gt;&lt;div&gt;******************&lt;/div&gt;&lt;div&gt;*******************&lt;/div&gt;&lt;div&gt;********************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; **&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;***&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ****&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*****&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ******&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*******&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ********&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*********&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; **********&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;***********&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; **************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;***************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; ****************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;*****************&lt;/div&gt;&lt;div&gt;&amp;nbsp; ******************&lt;/div&gt;&lt;div&gt;&amp;nbsp;*******************&lt;/div&gt;&lt;div&gt;********************&lt;/div&gt;&lt;div&gt;********************&lt;/div&gt;&lt;div&gt;&amp;nbsp;*******************&lt;/div&gt;&lt;div&gt;&amp;nbsp; ******************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;*****************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; ****************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;***************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; **************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ************&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;***********&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; **********&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*********&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ********&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*******&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ******&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*****&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ****&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;***&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; **&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;=============================================&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/7222514659732379709/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_29.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/7222514659732379709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/7222514659732379709'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_29.html' title='用*號字元劃出三角形'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-2307440443847317339</id><published>2024-06-28T22:28:00.000-07:00</published><updated>2024-06-28T22:28:32.969-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>最小公因數函式遞迴方式</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #0e1114; color: #228a96; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #addbbc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #0e1114; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;least_common_factor&lt;/span&gt;(&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;total&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;total&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;2&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;); &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (((&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;total&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;*=&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;least_common_factor&lt;/span&gt;(&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;total&lt;/span&gt;;&lt;span style=&quot;color: #44515e;&quot;&gt; // least common factor&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;Please input two value:&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;a = &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;, b = &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;, and least_common_factor is &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;, &lt;span style=&quot;color: #e6eaef;&quot;&gt;least_common_factor&lt;/span&gt;(&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;));&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;, and greatest common multiple is &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;least_common_factor&lt;/span&gt;(&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;));&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;Please input two value:25 35

=============================================
a = 25, b = 35, and least_common_factor is 5, and greatest common multiple is 175
=============================================&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please input two value:34 68&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;=============================================&lt;/div&gt;&lt;div&gt;a = 34, b = 68, and least_common_factor is 34, and greatest common multiple is 68&lt;/div&gt;&lt;div&gt;=============================================&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/2307440443847317339/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_4.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/2307440443847317339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/2307440443847317339'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_4.html' title='最小公因數函式遞迴方式'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-8435955310320486488</id><published>2024-06-28T21:57:00.000-07:00</published><updated>2024-06-28T21:57:52.986-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>最大公因數與最小公倍數的函式</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: #0e1114; color: #228a96; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #addbbc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #0e1114; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;least_common_factor&lt;/span&gt;(&lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;total&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;total&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;while&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;2&lt;/span&gt;; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;); &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (((&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;total&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;*=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;/=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;/=&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #bed0e2;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;gt;=&lt;/span&gt; ((&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;) &lt;span style=&quot;color: #228a96;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;))&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #44515e;&quot;&gt;// return total * var_a * var_b; //greatest common multiple&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;total&lt;/span&gt;;&lt;span style=&quot;color: #44515e;&quot;&gt; // least common factor&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;Please input two value:&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;a = &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;, b = &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;, and least_common_factor is &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;, &lt;span style=&quot;color: #e6eaef;&quot;&gt;least_common_factor&lt;/span&gt;(&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;));&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;, and greatest common multiple is &lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;least_common_factor&lt;/span&gt;(&lt;span style=&quot;color: #bed0e2;&quot;&gt;var_a&lt;/span&gt;, &lt;span style=&quot;color: #bed0e2;&quot;&gt;var_b&lt;/span&gt;));&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;Please input two value:15 18

=============================================
a = 15, b = 18, and least_common_factor is 3, and greatest common multiple is 90
=============================================&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;div&gt;Please input two value:15 18&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;=============================================&lt;/div&gt;&lt;div&gt;a = 15, b = 18, and least_common_factor is 3, and greatest common multiple is 90&lt;/div&gt;&lt;div&gt;=============================================&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/8435955310320486488/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_28.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/8435955310320486488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/8435955310320486488'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post_28.html' title='最大公因數與最小公倍數的函式'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-2400630880039787997</id><published>2024-06-28T20:22:00.000-07:00</published><updated>2024-06-28T20:22:01.345-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>質數搜尋</title><content type='html'>&lt;p&gt;輸入一個值, 列印此範圍的質數&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: #0e1114; color: #228a96; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #0e1114; color: #addbbc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #0e1114; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #e6eaef;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; i, j, sum;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #228a96;&quot;&gt;int&lt;/span&gt; input_max;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;Please input a value:&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;amp;&lt;/span&gt;input_max);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;===============Fnd prime numbers============&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (i &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;; i &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; input_max; i &lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;for&lt;/span&gt; (j &lt;span style=&quot;color: #228a96;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;1&lt;/span&gt;; j &lt;span style=&quot;color: #228a96;&quot;&gt;&amp;lt;=&lt;/span&gt; i; j &lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt;((i &lt;span style=&quot;color: #228a96;&quot;&gt;%&lt;/span&gt; j) &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum &lt;span style=&quot;color: #228a96;&quot;&gt;++&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;if&lt;/span&gt; (sum &lt;span style=&quot;color: #228a96;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;2&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;[&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;],&quot;&lt;/span&gt;, i);&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #e6eaef;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;=============================================&lt;/span&gt;&lt;span style=&quot;color: #6ba77f;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #addbbc;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #228a96;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #61bcc6;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;color: #aeb9c4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;Please input a value:50

===============Fnd prime numbers============
[2],[3],[5],[7],[11],[13],[17],[19],[23],[29],[31],[37],[41],[43],[47],
=============================================&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;Please input a value:100&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;===============Fnd prime numbers============&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;[2],[3],[5],[7],[11],[13],[17],[19],[23],[29],[31],[37],[41],[43],[47],[53],[59],[61],[67],[71],[73],[79],[83],[89],[97],&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;=============================================&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #aeb9c4; font-family: Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/2400630880039787997/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/2400630880039787997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/2400630880039787997'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2024/06/blog-post.html' title='質數搜尋'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-4657679378653744673</id><published>2019-04-10T18:27:00.001-07:00</published><updated>2019-04-10T18:27:16.241-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="EFI/UEFI開發工具"/><category scheme="http://www.blogger.com/atom/ns#" term="EFI/UEFI開發設計"/><title type='text'>Developer&#39;s UEFI Emulation (DUET) on Edk2 for Boot Disk</title><content type='html'>Developer&#39;s UEFI Emulation (DUET) on Edk2&lt;br /&gt;
&lt;br /&gt;
From:&amp;nbsp;https://github.com/tianocore/edk2/raw/master/DuetPkg/ReadMe.txt&lt;br /&gt;
&lt;br /&gt;
A. Build DUET image on Windows Platform&lt;br /&gt;
========================================&lt;br /&gt;
1. Tools preparation&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; To build DUET image, Visual Studio is required:&lt;br /&gt;
&amp;nbsp; 1). Base on below link to create Visual Studio build environment.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; https://github.com/tianocore/tianocore.github.io/wiki/Windows-systems&lt;br /&gt;
&lt;br /&gt;
2. Build Duet Platform module&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; 1). run cmd.exe to open command line window.&lt;br /&gt;
&amp;nbsp; 2). enter workspace root directory such as c:\edk2_tree&lt;br /&gt;
&amp;nbsp; 3). set the environment variable EDK_TOOLS_BIN to point at the BaseTools binaries directory&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; i.e., &quot;set EDK_TOOLS_BIN=c:\edk2-BaseTools-win32&quot;&lt;br /&gt;
&amp;nbsp; 4). run &quot;edksetup.bat&quot;&lt;br /&gt;
&amp;nbsp; 5). run &quot;build -p DuetPkg\DuetPkgIa32.dsc -a IA32 -t VS2015x86&quot; for IA32 architecture platform (using 64-bit VS2015 for example) or&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;build -p DuetPkg\DuetPkgX64.dsc -a X64 -t VS2015x86&quot; for X64 architecture platform.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; NOTE: The post build script &#39;PostBuild.sh&#39; will be automatically called after the build command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create bootable disk&lt;br /&gt;
======================&lt;br /&gt;
&lt;br /&gt;
3. Create boot disk&lt;br /&gt;
&amp;nbsp; The following steps are same for IA32 architecture platform or X64 architecture platform.&lt;br /&gt;
&lt;br /&gt;
3.1 Create floppy boot disk&lt;br /&gt;
&amp;nbsp; 1). enter &lt;workspace&gt;\DuetPkg directory.&lt;/workspace&gt;&lt;br /&gt;
&amp;nbsp; 2). Insert a floppy disk to drive&lt;br /&gt;
&amp;nbsp; 3). run &quot;CreateBootDisk.bat floppy a: FAT12 IA32&quot; if floppy drive is a: disk and Arch to boot is IA32.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; or&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; run &quot;CreateBootDisk.bat floppy a: FAT12 X64&quot; if floppy drive is a: disk and Arch to boot is X64.&lt;br /&gt;
3.2 Create usb boot disk&lt;br /&gt;
&amp;nbsp; 1). enter &lt;workspace&gt;\DuetPkg directory.&lt;/workspace&gt;&lt;br /&gt;
&amp;nbsp; 2). Plugin usb disk&lt;br /&gt;
&amp;nbsp; 3). run &quot;CreateBootDisk.bat usb e: FAT16 IA32&quot; if usb drive is e: and FAT format is FAT16 and Arch to boot is IA32.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; or &quot;CreateBootDisk.bat usb e: FAT16 X64&quot; if usb drive is e: and FAT format is FAT16 and Arch to boot is X64.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; or &quot;CreateBootDisk.bat usb e: FAT32 IA32&quot; if usb drive is e: and FAT format is FAT32 and Arch to boot is IA32.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; or &quot;CreateBootDisk.bat usb e: FAT32 X64&quot; if usb drive is e: and FAT format is FAT32 and Arch to boot is X64.&lt;br /&gt;
&amp;nbsp; 4). UnPlug usb disk and plugin it again.&lt;br /&gt;
&amp;nbsp; 5). run &quot;CreateBootDisk.bat usb e: FAT16 IA32 step2&quot; if usb drive is e: and FAT format is FAT16 and Arch to boot is IA32.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; or &quot;CreateBootDisk.bat usb e: FAT16 X64 step2&quot; if usb drive is e: and FAT format is FAT16 and Arch to boot is X64.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; or &quot;CreateBootDisk.bat usb e: FAT32 IA32 step2&quot; if usb drive is e: and FAT format is FAT32 and Arch to boot is IA32.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; or &quot;CreateBootDisk.bat usb e: FAT32 X64 step2&quot; if usb drive is e: and FAT format is FAT32 and Arch to boot is X64.&lt;br /&gt;
&lt;br /&gt;
B. Build DUET image on Linux Platform&lt;br /&gt;
======================================&lt;br /&gt;
1. Tools preparation&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; To build DUET image, GCC installation (4.4+) is required:&lt;br /&gt;
&amp;nbsp; 1). Base on below link to create GCC build environment.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC&lt;br /&gt;
&lt;br /&gt;
2. Build Duet Platform module&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; 1). Open the terminal.&lt;br /&gt;
&amp;nbsp; 2). enter workspace root directory such as /edk2_tree&lt;br /&gt;
&amp;nbsp; 3). run &quot;. edksetup.sh BaseTools&quot;&lt;br /&gt;
&amp;nbsp; 4). run &quot;build -p DuetPkg/DuetPkgIa32.dsc -a IA32 -t GCC49&quot; for IA32 architecture platform (using GCC 4.9 for example) or&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;build -p DuetPkg/DuetPkgX64.dsc -a X64 -t GCC49&quot; for X64 architecture platform.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; NOTE: The post build script &#39;PostBuild.sh&#39; will be automatically called after the build command.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; After post build action, you should check the size of EfiLdr at $WORKSPACE/Build/DuetPkgIA32(DuetPkgX64)/DEBUG_GCC49 directory, it must less than 470k.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If not, you should manually remove some unnecessary drivers at DuetPkg.fdf file.&lt;br /&gt;
&lt;br /&gt;
3. Create bootable disk&lt;br /&gt;
&amp;nbsp; &amp;nbsp;The following steps are same for IA32 architecture platform or X64 architecture platform.&lt;br /&gt;
&lt;br /&gt;
3.1 Create floppy boot disk&lt;br /&gt;
&amp;nbsp; 1). enter /edk2_tree/DuetPkg directory.&lt;br /&gt;
&amp;nbsp; 2). Insert a floppy disk to drive&lt;br /&gt;
&amp;nbsp; 3). run &quot;CreateBootDisk.sh&quot; to build floppy drive&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; such as &quot;./CreateBootDisk.sh floppy /media/floppy0 /dev/fd0 FAT12 IA32&quot;&lt;br /&gt;
&lt;br /&gt;
3.2 Create usb boot disk&lt;br /&gt;
&amp;nbsp; 1). enter /edk2_tree/DuetPkg directory.&lt;br /&gt;
&amp;nbsp; 2). Plugin usb disk&lt;br /&gt;
&amp;nbsp; 3). run &quot;CreateBootDisk.sh&quot; to build usb drive&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; such as &quot;./CreateBootDisk.sh usb /media/usb0 /dev/sdb0 FAT16 IA32&quot;&lt;br /&gt;
&amp;nbsp; 4). UnPlug usb disk and plugin it again.&lt;br /&gt;
&amp;nbsp; 5). run &quot;./CreateBootDisk.sh usb /media/usb0 /dev/sdb0 FAT16 IA32 step2&quot;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/4657679378653744673/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2019/04/developers-uefi-emulation-duet-on-edk2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/4657679378653744673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/4657679378653744673'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2019/04/developers-uefi-emulation-duet-on-edk2.html' title='Developer&#39;s UEFI Emulation (DUET) on Edk2 for Boot Disk'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-1904608001314035018</id><published>2017-12-18T19:09:00.001-08:00</published><updated>2017-12-18T19:09:31.882-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="EFI/UEFI開發工具"/><category scheme="http://www.blogger.com/atom/ns#" term="EFI/UEFI開發設計"/><title type='text'>UDK2017 How to Build</title><content type='html'>From: https://github.com/tianocore/tianocore.github.io/wiki/UDK2017-How-to-Build&lt;br /&gt;
&lt;br /&gt;
HOW TO BUILD (WINDOWS SYSTEM)&lt;br /&gt;
The steps below are verified on Microsoft Windows 10 Enterprise*:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;br /&gt;1. Setup Build Environment&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;ul&gt;
&lt;li&gt;Install Microsoft Visual Studio 2015* in the build machine and make sure that AMD64 complier was selected when installing.&lt;/li&gt;
&lt;li&gt;Download NASM 2.0.7 or later from http://www.nasm.us/ and install it to C:\Nasm. Make sure C:\Nasm is added to system environment variable &#39;PATH&#39;&lt;/li&gt;
&lt;li&gt;Set up for using GitHub for Windows. See: https://github.com/tianocore/tianocore.github.io/wiki/Getting-Started-with-EDK-II#github-help&lt;/li&gt;
&lt;li&gt;Download and install Python2.7.x https://www.python.org/ for building the BaseTools Default install directory is: C:/Python27&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
2. Create the full Source Code directory for the UDK2017 release&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
(1). Create a working space directory in the build machine, for example, C:\MyWorkspace&lt;br /&gt;(2). Download the official UDK2017 release .zip file from the UDK2017 Release Page&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
a. Download - UDK2017 edk-vUDK2017 Workspace Source code (zip file)&lt;br /&gt;b. Extract files in [edk2-vUDK2017] to the working space directory C:\MyWorkspace.&lt;/blockquote&gt;
(3). OR Checkout the vUDK2017 Tag from GitHub with the following &quot;git&quot; command run git clone https://github.com/tianocore/edk2.git vUDK2017 Move all files and folders under &quot;vUDK2017&quot; to &quot;C:\MyWorkspace&quot; Optional (See Compile the BaseTools below) Checkout BaseTools binaries and copy them to BaseTools binary folder. Warning the Windows* Binary tools are only valid for the tip of the https://github.com/tianocore/edk2 repository.&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
a. Cd C:\MyWorkspace&lt;br /&gt;b. Run git clone https://github.com/tianocore/edk2-BaseTools-win32.git&lt;br /&gt;c. Enter folder edk2-BaseTools-win32&lt;br /&gt;d. Run the command git checkout 0e088c19ab31fccd1d2f55d9e4fe0314b57c0097&lt;br /&gt;e. Cd C:\MyWorkSpace&lt;br /&gt;f. Rename this folder from edk2-BaseTools-win32 to win32, then copy the win32 directory into the BaseTools/Bin directory under the workspace. (e.g. &quot;C:\MyWorkspace\BaseTools\Bin&quot;)&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
3. Generate OpenSSL* Crypto Library&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
(1). Open file &quot;C:\MyWorkspace\CryptoPkg\Library\OpensslLib\OpenSSL-HOWTO.txt&quot; and follow the instruction to install OpenSSL* for UEFI building. For this release, please use OpenSSL-1.1.0e.&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
4. Compile the BaseTools (Skip if Optional Step 2.iv was done above) See: https://github.com/tianocore/tianocore.github.io/wiki/Windows-systems#compile-tools&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
(1). Open a Microsoft Visual Studio* command prompt, type cd C:\MyWorkspace to enter the workspace directory&lt;br /&gt;(2). Compile the BaseTools C source tools&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;set PYTHON_HOME=C:\Python27&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set EDK_TOOLS_PATH=%CD%\BaseTools&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BaseTools\toolssetup.bat Rebuild&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
5. Build Steps *** NT32 ***&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
(1). Open a Microsoft Visual Studio* command prompt, type cd C:\MyWorkspace to enter the workspace directory&lt;br /&gt;(2). Use edksetup.bat command to initialize the working environment. edksetup --nt32&lt;br /&gt;(3). Type following command to build Nt32 platform build -t VS2015x86&lt;br /&gt;(4). Upon the build completing successfully there should be the UEFI Application &quot;HelloWorld.efi&quot; in the C:\MyWorkspace\Build\MdeModule\DEBUG_VS2015x86\IA32 directory&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/1904608001314035018/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2017/12/udk2017-how-to-build.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/1904608001314035018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/1904608001314035018'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2017/12/udk2017-how-to-build.html' title='UDK2017 How to Build'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-1256724576896571410</id><published>2017-03-08T21:18:00.002-08:00</published><updated>2017-03-08T21:18:29.580-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="EFI/UEFI Secure Boot"/><category scheme="http://www.blogger.com/atom/ns#" term="EFI/UEFI Shell 指令集"/><title type='text'>Check Legacy BIOS Image from UEFi Shell</title><content type='html'>//The program is for searching and dumping&amp;nbsp;Legacy BIOS Image between 0 to 1M system Memory.&lt;br /&gt;
EFI_STATUS&lt;br /&gt;
EFIAPI&lt;br /&gt;
InitializeUIApplication (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IN EFI_HANDLE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ImageHandle,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IN EFI_SYSTEM_TABLE &amp;nbsp; &amp;nbsp; *SystemTable&lt;br /&gt;
) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EFI_STATUS Status = EFI_SUCCESS;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EFI_SHELL_APP_INIT (ImageHandle, SystemTable);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UINT64 addr, offset;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UINT16 count = 0, i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Print(L&quot;Detecting....\n&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //for (addr = 0xC0000; addr &amp;lt; 0xE0000; addr += 0x200)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (addr = 0x0000; addr &amp;lt; 0x100000; addr += 0x200)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; //Print(L&quot;address=0x%x\n&quot;, addr);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((*(UINT16 *)(addr + 0x00)) == 0xAA55) &amp;amp;&amp;amp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((*(UINT16 *)(addr + 0x20)) == 0x8086) &amp;amp;&amp;amp; //Vendor ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //((*(UINT16 *)(addr + 0x22)) == 0x27D8) &amp;amp;&amp;amp; //Device ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (1)) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Print(L&quot;Legacy BIOS is at:0x%08x\n&quot;, (UINT32)(UINT64)addr);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (offset = 0; offset &amp;lt; 4; offset ++){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Print(L&quot;%08x: &quot;, (UINT32)(addr + offset * 0x10));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (i = 0; i &amp;lt; 16; i ++) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Print(L&quot;%02x &quot;, (UINT8)*((UINT8 *)addr + offset * 0x10 + i));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (i = 0; i &amp;lt; 16; i ++) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (((UINT8)*((UINT8 *)(addr + offset * 0x10 + &amp;nbsp;i)) &amp;gt;= 0x20)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; ((UINT8)*((UINT8 *)(addr + offset * 0x10 + &amp;nbsp;i)) &amp;lt; 0x80))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Print(L&quot;%c&quot;, (UINT8)*((UINT8 *)addr + offset * 0x10 + i));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Print(L&quot;.&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Print(L&quot;\n&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count ++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (count == 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Print(L&quot;No found any BIOS image.\n&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Print(L&quot;System BIOS remaining memory[0040h:0013h]=0x%x(%d KBytes)\n&quot;, *(UINT16 *)0x413, *(UINT16 *)0x413);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Print(L&quot;Length of EBDA[0040h:000Eh]=%xh:0000h=%dk\n&quot;, *(UINT16 *)0x40e, *(UINT8 *)((UINT32)*(UINT16 *)0x40e &amp;lt;&amp;lt; 4));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return Status;&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/1256724576896571410/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2017/03/check-legacy-bios-image-from-uefi-shell.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/1256724576896571410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/1256724576896571410'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2017/03/check-legacy-bios-image-from-uefi-shell.html' title='Check Legacy BIOS Image from UEFi Shell'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-818894590934815941</id><published>2016-08-05T06:06:00.000-07:00</published><updated>2024-06-28T19:21:37.060-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>How to use __FILE__, __DATE__, __TIME__, __LINE__, __FUNCTION__, __FILE__ to debug in C?</title><content type='html'>&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-size: 14px;&quot;&gt;&lt;span style=&quot;background-image: none; border-collapse: collapse; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: song, Verdana; font-size: 12px;&quot;&gt;================================================&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: song, Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;__FILE__ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;current file nume.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: song, Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;__FUNCTION__ &amp;nbsp; &amp;nbsp;current functionnume.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: song, Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;__LINE__ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;current line number.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: song, Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;__DATE__ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;built date.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: song, Verdana;&quot;&gt;&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none;&quot;&gt;&lt;span style=&quot;background-image: none; border-collapse: collapse; border: 0px none rgb(46, 46, 46); box-shadow: none; font-size: 12px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: song, Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;__TIME__ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;built time.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-size: 14px;&quot;&gt;&lt;span style=&quot;background-image: none; border-collapse: collapse; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: song, Verdana; font-size: 12px;&quot;&gt;================================================&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-size: 14px;&quot;&gt;&lt;span style=&quot;background-image: none; border-collapse: collapse; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: song, Verdana; font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-size: 14px;&quot;&gt;&lt;span style=&quot;background-image: none; border-collapse: collapse; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: song, Verdana; font-size: 12px;&quot;&gt;#include &lt;stdio .h=&quot;&quot;&gt;&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
#include &lt;stdlib .h=&quot;&quot;&gt;&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
void&amp;nbsp;call_test_fun(void);&lt;/stdlib&gt;&lt;/stdio&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-size: 14px;&quot;&gt;&lt;span style=&quot;background-image: none; border-collapse: collapse; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: song, Verdana; font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: song, Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;#define DBG_PRINT(msg, arg...) printf(&quot;%s:%s(%d): &quot; msg, __FILE__, __FUNCTION__, __LINE__, ##arg)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-size: 14px;&quot;&gt;&lt;span style=&quot;background-image: none; border-collapse: collapse; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: song, Verdana; font-size: 12px;&quot;&gt;
int main(void)&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
{&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf( &quot;The file is: %s\n&quot;, __FILE__ );&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: song, Verdana; font-size: 12px;&quot;&gt;&amp;nbsp; printf( &quot;This function is: %s\n&quot;, __FUNCTION__ );&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: song, Verdana; font-size: 12px;&quot;&gt;&amp;nbsp; &amp;nbsp; printf( &quot;This is line: %d\n&quot;, __LINE__ );&lt;/span&gt;&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: song, Verdana; font-size: 12px; font-stretch: normal;&quot; /&gt;&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-size: 14px;&quot;&gt;&lt;span style=&quot;background-image: none; border-collapse: collapse; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: song, Verdana; font-size: 12px;&quot;&gt;&amp;nbsp; &amp;nbsp; printf( &quot;The date is: %s\n&quot;, __DATE__ );&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf( &quot;The time is: %s\n&quot;, __TIME__ );&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; call_test_fun();&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
}&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
void call_test_fun(void)&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
{&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf( &quot;This function is: %s\n&quot;,&amp;nbsp;__func__&amp;nbsp;);&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf( &quot;The file is: %s\n&quot;, __FILE__ );&lt;br style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none; font-stretch: normal;&quot; /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf( &quot;This is line: %d\n&quot;, __LINE__ );&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: song, Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp; &amp;nbsp; printf( &quot;STDC: %d \n&quot;, __STDC__);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: song, Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp; &amp;nbsp; printf( &quot;STDC_HOSTED: %d \n&quot;, __STDC_HOSTED__);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: song, Verdana;&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;&amp;nbsp; &amp;nbsp; printf( &quot;VERSION: %s \n&quot;, __VERSION__);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none;&quot;&gt;&lt;span style=&quot;background-image: none; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px none rgb(46, 46, 46); box-shadow: none;&quot;&gt;&lt;span style=&quot;background-image: none; border-collapse: collapse; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px none rgb(46, 46, 46); box-shadow: none; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: song, Verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; printf( &quot;TIMESTAMP: %s \n&quot;, __TIMESTAMP__);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none;&quot;&gt;&lt;span style=&quot;background-image: none; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px none rgb(46, 46, 46); box-shadow: none;&quot;&gt;&lt;span style=&quot;background-image: none; border-collapse: collapse; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px none rgb(46, 46, 46); box-shadow: none; font-size: 12px;&quot;&gt;&lt;span style=&quot;font-family: song, Verdana;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: song, Verdana; font-size: 12px;&quot;&gt;DBG_PRINT(&quot;number = %d, str = %s\n&quot;, index, str);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-image: none; border: 0px none rgb(46, 46, 46); box-shadow: none;&quot;&gt;&lt;span style=&quot;background-image: none; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px none rgb(46, 46, 46); box-shadow: none;&quot;&gt;&lt;span style=&quot;background-image: none; border-collapse: collapse; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px none rgb(46, 46, 46); box-shadow: none; font-family: song, Verdana; font-size: 12px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;

</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/818894590934815941/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2016/08/how-to-use-file-date-time-line-function.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/818894590934815941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/818894590934815941'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2016/08/how-to-use-file-date-time-line-function.html' title='How to use __FILE__, __DATE__, __TIME__, __LINE__, __FUNCTION__, __FILE__ to debug in C?'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-4307674390054229019</id><published>2016-08-05T05:17:00.003-07:00</published><updated>2016-08-05T05:46:48.484-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="EFI/UEFI Hii(Human Interface Infrstructure)"/><category scheme="http://www.blogger.com/atom/ns#" term="EFI/UEFI開發設計"/><title type='text'>Create a Pop Up box in Hii(Human Interface Infrstructure)</title><content type='html'>&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;u16 i;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;EFI_INPUT_KEY&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DEBUG_PRINT ((&quot;Key scan.........\n&quot;));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;do {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; CreatePopUp (&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EFI_LIGHTGRAY | EFI_BACKGROUND_RED,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;amp;Key,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;L&quot;&quot;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; L&quot;Would you like to create this virtual disk?&quot;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;L&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[Yes]&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[No]&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;L&quot;&quot;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;NULL&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; );&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;DEBUG_PRINT&amp;nbsp;((&quot;Unicode=0x%x, ScanCode=0x%x &amp;lt;%c&amp;gt;\n&quot;, Key.UnicodeChar, Key.ScanCode, Key.UnicodeChar));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;} while ((Key.ScanCode != SCAN_ESC) &amp;amp;&amp;amp; (Key.UnicodeChar != CHAR_CARRIAGE_RETURN));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Print Messages:&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;Unicode=0x79,&amp;nbsp;ScanCode=0x0 &lt;y&gt;&lt;/y&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;Unicode=0x59,&amp;nbsp;ScanCode=0x0 &lt;y&gt;&lt;/y&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;Unicode=0x6E,&amp;nbsp;ScanCode=0x0 &lt;n&gt;&lt;/n&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;Unicode=0x4E,&amp;nbsp;ScanCode=0x0 &lt;n&gt;&lt;/n&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ScanCode=0x0(SCAN_NULL)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: purple;&quot;&gt;//&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: purple;&quot;&gt;// EFI Console Colours&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: purple;&quot;&gt;//&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
#define EFI_BLACK&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x00&lt;/div&gt;
&lt;div&gt;
#define EFI_BLUE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x01&lt;/div&gt;
&lt;div&gt;
#define EFI_GREEN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x02&lt;/div&gt;
&lt;div&gt;
#define EFI_CYAN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (EFI_BLUE | EFI_GREEN)&lt;/div&gt;
&lt;div&gt;
#define EFI_RED&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x04&lt;/div&gt;
&lt;div&gt;
#define EFI_MAGENTA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(EFI_BLUE | EFI_RED)&lt;/div&gt;
&lt;div&gt;
#define EFI_BROWN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(EFI_GREEN | EFI_RED)&lt;/div&gt;
&lt;div&gt;
#define EFI_LIGHTGRAY&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(EFI_BLUE | EFI_GREEN | EFI_RED)&lt;/div&gt;
&lt;div&gt;
#define EFI_BRIGHT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x08&lt;/div&gt;
&lt;div&gt;
#define EFI_DARKGRAY&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (EFI_BRIGHT)&lt;/div&gt;
&lt;div&gt;
#define EFI_LIGHTBLUE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(EFI_BLUE | EFI_BRIGHT)&lt;/div&gt;
&lt;div&gt;
#define EFI_LIGHTGREEN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (EFI_GREEN | EFI_BRIGHT)&lt;/div&gt;
&lt;div&gt;
#define EFI_LIGHTCYAN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(EFI_CYAN | EFI_BRIGHT)&lt;/div&gt;
&lt;div&gt;
#define EFI_LIGHTRED&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (EFI_RED | EFI_BRIGHT)&lt;/div&gt;
&lt;div&gt;
#define EFI_LIGHTMAGENTA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (EFI_MAGENTA | EFI_BRIGHT)&lt;/div&gt;
&lt;div&gt;
#define EFI_YELLOW&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (EFI_BROWN | EFI_BRIGHT)&lt;/div&gt;
&lt;div&gt;
#define EFI_WHITE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
#define EFI_TEXT_ATTR(f, b)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((f) | ((b) &amp;lt;&amp;lt; 4))&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
#define EFI_BACKGROUND_BLACK&amp;nbsp; &amp;nbsp; &amp;nbsp; 0x00&lt;/div&gt;
&lt;div&gt;
#define EFI_BACKGROUND_BLUE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x10&lt;/div&gt;
&lt;div&gt;
#define EFI_BACKGROUND_GREEN&amp;nbsp; &amp;nbsp; &amp;nbsp; 0x20&lt;/div&gt;
&lt;div&gt;
#define EFI_BACKGROUND_CYAN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN)&lt;/div&gt;
&lt;div&gt;
#define EFI_BACKGROUND_RED&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x40&lt;/div&gt;
&lt;div&gt;
#define EFI_BACKGROUND_MAGENTA&amp;nbsp; &amp;nbsp; (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_RED)&lt;/div&gt;
&lt;div&gt;
#define EFI_BACKGROUND_BROWN&amp;nbsp; &amp;nbsp; &amp;nbsp; (EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)&lt;/div&gt;
&lt;div&gt;
#define EFI_BACKGROUND_LIGHTGRAY&amp;nbsp; (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: purple;&quot;&gt;//&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: purple;&quot;&gt;// EFI Scan codes&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: purple;&quot;&gt;//&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
#define SCAN_NULL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x0000&lt;/div&gt;
&lt;div&gt;
#define SCAN_UP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x0001&lt;/div&gt;
&lt;div&gt;
#define SCAN_DOWN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x0002&lt;/div&gt;
&lt;div&gt;
#define SCAN_RIGHT&amp;nbsp; &amp;nbsp; &amp;nbsp; 0x0003&lt;/div&gt;
&lt;div&gt;
#define SCAN_LEFT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x0004&lt;/div&gt;
&lt;div&gt;
#define SCAN_HOME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x0005&lt;/div&gt;
&lt;div&gt;
#define SCAN_END&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x0006&lt;/div&gt;
&lt;div&gt;
#define SCAN_INSERT&amp;nbsp; &amp;nbsp; &amp;nbsp;0x0007&lt;/div&gt;
&lt;div&gt;
#define SCAN_DELETE&amp;nbsp; &amp;nbsp; &amp;nbsp;0x0008&lt;/div&gt;
&lt;div&gt;
#define SCAN_PAGE_UP&amp;nbsp; &amp;nbsp; 0x0009&lt;/div&gt;
&lt;div&gt;
#define SCAN_PAGE_DOWN&amp;nbsp; 0x000A&lt;/div&gt;
&lt;div&gt;
#define SCAN_F1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x000B&lt;/div&gt;
&lt;div&gt;
#define SCAN_F2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x000C&lt;/div&gt;
&lt;div&gt;
#define SCAN_F3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x000D&lt;/div&gt;
&lt;div&gt;
#define SCAN_F4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x000E&lt;/div&gt;
&lt;div&gt;
#define SCAN_F5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x000F&lt;/div&gt;
&lt;div&gt;
#define SCAN_F6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x0010&lt;/div&gt;
&lt;div&gt;
#define SCAN_F7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x0011&lt;/div&gt;
&lt;div&gt;
#define SCAN_F8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x0012&lt;/div&gt;
&lt;div&gt;
#define SCAN_F9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x0013&lt;/div&gt;
&lt;div&gt;
#define SCAN_F10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x0014&lt;/div&gt;
&lt;div&gt;
#define SCAN_F11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x0015&lt;/div&gt;
&lt;div&gt;
#define SCAN_F12&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x0016&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
#define SCAN_ESC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x0017&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/4307674390054229019/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2016/08/create-pop-up-box-in-hiihuman-interface.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/4307674390054229019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/4307674390054229019'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2016/08/create-pop-up-box-in-hiihuman-interface.html' title='Create a Pop Up box in Hii(Human Interface Infrstructure)'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-1714011587413840156</id><published>2016-06-24T02:45:00.000-07:00</published><updated>2024-06-28T19:23:09.787-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="程式設計"/><title type='text'>Convert __DATE__ to unsigned int</title><content type='html'>&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;January =&amp;gt; Jan.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;February =&amp;gt; Feb.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;March =&amp;gt; Mar.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;April =&amp;gt; Apr.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;May =&amp;gt; May.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;June =&amp;gt; Jun.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;July =&amp;gt; Jul.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;August =&amp;gt; Aug.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;September =&amp;gt; Sep.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;October =&amp;gt; Oct.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;November =&amp;gt; Nov.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;December =&amp;gt; Dec.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;#include 〈stdio.h〉&lt;stdio .h=&quot;&quot;&gt;&lt;/stdio&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Arial, sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;#define YEAR ((((__DATE__ [7] - &#39;0&#39;) * 10 + (__DATE__ [8] - &#39;0&#39;)) * 10 \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;+ (__DATE__ [9] - &#39;0&#39;)) * 10 + (__DATE__ [10] - &#39;0&#39;))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 13.65px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
#if 0 //fail when input &quot;Jun&quot;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;#define MONTH (__DATE__ [2] == &#39;n&#39; ? 0 \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;: __DATE__ [2] == &#39;b&#39; ? 1 \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;: __DATE__ [2] == &#39;r&#39; ? (__DATE__ [0] == &#39;M&#39; ? 2 : 3) \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;: __DATE__ [2] == &#39;y&#39; ? 4 \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;: __DATE__ [2] == &#39;n&#39; ? 5 \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;: __DATE__ [2] == &#39;l&#39; ? 6 \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;: __DATE__ [2] == &#39;g&#39; ? 7 \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;: __DATE__ [2] == &#39;p&#39; ? 8 \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;: __DATE__ [2] == &#39;t&#39; ? 9 \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;: __DATE__ [2] == &#39;v&#39; ? 10 : 11)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 13.65px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;#endif&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 13.65px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 13.65px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;//fixed&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
#define MONTH (__DATE__ [2] == &#39;n&#39; ? &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;(__DATE__ [1] == &#39;a&#39; ? 0 : 5)&lt;/span&gt;&amp;nbsp; \&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: __DATE__ [2] == &#39;b&#39; ? 1 \&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: __DATE__ [2] == &#39;r&#39; ? (__DATE__ [0] == &#39;M&#39; ? 2 : 3) \&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: __DATE__ [2] == &#39;y&#39; ? 4 \&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: __DATE__ [2] == &#39;l&#39; ? 6 \&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: __DATE__ [2] == &#39;g&#39; ? 7 \&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: __DATE__ [2] == &#39;p&#39; ? 8 \&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: __DATE__ [2] == &#39;t&#39; ? 9 \&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: __DATE__ [2] == &#39;v&#39; ? 10 : 11)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;#define DAY ((__DATE__ [4] == &#39; &#39; ? 0 : __DATE__ [4] - &#39;0&#39;) * 10 \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;+ (__DATE__ [5] - &#39;0&#39;))&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Arial, sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;#define DATE_AS_INT (((YEAR - 2000) * 12 + MONTH) * 31 + DAY)&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Arial, sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;int main (void)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;printf (&quot;%d-%02d-%02d = %d\n&quot;, YEAR, MONTH + 1, DAY, DATE_AS_INT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;return 0;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.65px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/1714011587413840156/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2016/06/convert-date-to-unsigned-int.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/1714011587413840156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/1714011587413840156'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2016/06/convert-date-to-unsigned-int.html' title='Convert __DATE__ to unsigned int'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-6968763640754681636</id><published>2016-01-18T00:50:00.000-08:00</published><updated>2016-01-18T01:01:49.319-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="EFI/UEFI開發工具"/><category scheme="http://www.blogger.com/atom/ns#" term="EFI/UEFI開發設計"/><title type='text'>UDK2014 How to Build</title><content type='html'>&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box;&quot;&gt;UDK2014 - How to build instructions&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
Download the UDK2014 Release with expanded workspace directories&amp;nbsp;&lt;a href=&quot;http://sourceforge.net/projects/edk2/files/UDK2014_Releases/UDK2014/UDK2014.Complete.MyWorkSpace.zip/download&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #4078c0; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;DownLoad&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em;&quot;&gt;
&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/tianocore/tianocore.github.io/wiki/UDK2014_How-to-Build#udk2014-release-files--directories&quot; id=&quot;user-content-udk2014-release-files--directories&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;span class=&quot;octicon octicon-link&quot; style=&quot;box-sizing: border-box; color: black; display: inline-block; font-family: &amp;quot;octicons&amp;quot;; font-size: 16px; font-stretch: normal; font-weight: normal; line-height: 1; vertical-align: middle; visibility: hidden;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;user-content-UDK2014_Release_Files__Directories&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: inherit;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;UDK2014 Release Files / Directories&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
What is included in the Downloaded zip file&lt;/div&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;UDK2014.MyWorkSpace.zip&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;BaseTools(Windows).zip&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;BaseTools(Unix).tar&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Documents&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Notes&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/tianocore/tianocore.github.io/wiki/UDK2014_How-to-Build#windows-system-configuration&quot; id=&quot;user-content-windows-system-configuration&quot; style=&quot;background-color: transparent; box-sizing: border-box; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;span class=&quot;octicon octicon-link&quot; style=&quot;box-sizing: border-box; display: inline-block; font-family: &amp;quot;octicons&amp;quot;; font-size: 16px; font-stretch: normal; font-weight: normal; line-height: 1; vertical-align: middle; visibility: hidden;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;user-content-Windows_System_Configuration&quot; style=&quot;background-color: transparent; box-sizing: border-box;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;Windows System Configuration&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
&lt;b style=&quot;box-sizing: border-box;&quot;&gt;Microsoft Windows 7 Ultimate 64-bit*&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
1. Setup Build Environment&lt;/div&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;1) Install Microsoft Visual Studio 2008* SP1 in the build machine and make sure that AMD64 complier was selected when installing.&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 16px; line-height: 25.6px;&quot;&gt;2. Extract Common Source Code&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;1) Extract files in [UDK2014.MyWorkSpace.zip] to the working space directory (e.g C:). Note the Directory &quot;MyWorkSpace&quot; will be created as a result. In this case, it is C:\MyWorkspace.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;2) There are two BaseTools package one is for Windows system and another is for UNIX-Like system. Please make sure BaseTools(Windows).zip is used here. Expand the appropriate BaseTools to C:\MyWorkSpace&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 16px; line-height: 25.6px;&quot;&gt;3. Generate OpenSSL* Crypto Library Note: this does not need to be done for Nt32&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; font-family: &#39;helvetica neue&#39;, helvetica, &#39;segoe ui&#39;, arial, freesans, sans-serif, &#39;apple color emoji&#39;, &#39;segoe ui emoji&#39;, &#39;segoe ui symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;Open file &quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;C:\MyWorkspace\CryptoPkg\Library\OpensslLib\Patch-HOWTO.tx&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;t&quot; and follow the instruction to install OpenSSL* for UEFI building.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: helvetica neue, helvetica, segoe ui, arial, freesans, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple; font-family: helvetica neue, helvetica, segoe ui, arial, freesans, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol; line-height: 25.6px;&quot;&gt;&lt;a href=&quot;http://ftp.vim.org/security/openssl/&quot;&gt;http://ftp.vim.org/security/openssl/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: helvetica neue, helvetica, segoe ui, arial, freesans, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple; font-family: helvetica neue, helvetica, segoe ui, arial, freesans, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol; line-height: 25.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;=====================================================================&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OpenSSL-Version&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;=====================================================================&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; Current supported OpenSSL version for UEFI Crypto Library is 1.0.2d.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; http://www.openssl.org/source/openssl-1.0.2d.tar.gz&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;=====================================================================&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HOW to Install Openssl for UEFI Building&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;=====================================================================&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;1. &amp;nbsp;Download OpenSSL 1.0.2d from official website:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; http://www.openssl.org/source/openssl-1.0.2d.tar.gz&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; NOTE: Some web browsers may rename the downloaded TAR file to openssl-1.0.2d.tar.tar.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; When you do the download, rename the &quot;openssl-1.0.2d.tar.tar&quot; to&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;openssl-1.0.2d.tar.gz&quot; or rename the local downloaded file with &quot;.tar.tar&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; extension to &quot;.tar.gz&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;2. &amp;nbsp;Extract TAR into CryptoPkg/Library/OpenSslLib/openssl-1.0.2d&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; NOTE: If you use WinZip to unpack the openssl source in Windows, please&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; uncheck the WinZip smart CR/LF conversion option (WINZIP: Options --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Configuration --&amp;gt; Miscellaneous --&amp;gt; &quot;TAR file smart CR/LF conversion&quot;).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;3. &amp;nbsp;Apply this patch: EDKII_openssl-1.0.2d.patch, and make installation&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; For Windows Environment:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; ------------------------&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; 1) Make sure the patch utility has been installed in your machine.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Install Cygwin or get the patch utility binary from&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; http://gnuwin32.sourceforge.net/packages/patch.htm&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; 2) cd $(WORKSPACE)\CryptoPkg\Library\OpensslLib\openssl-1.0.2d&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; 3) patch -p0 -i ..\EDKII_openssl-1.0.2d.patch&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; 4) cd ..&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; 5) Install.cmd&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; For Linux* Environment:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; -----------------------&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; 1) Make sure the patch utility has been installed in your machine.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Patch utility is available from http://directory.fsf.org/project/patch/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; 2) cd $(WORKSPACE)/CryptoPkg/Library/OpensslLib/openssl-1.0.2d&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; 3) patch -p0 -i ../EDKII_openssl-1.0.2d.patch&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; 4) cd ..&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp; 5) ./Install.sh&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 25.6px;&quot;&gt;
&lt;div style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;=====================================================================&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333;&quot;&gt;
&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 16px; line-height: 25.6px;&quot;&gt;4. Build Steps *** NT32 ***&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;1) Open a command prompt, type command &quot;cd C:\MyWorkspace&quot; to enter the workspace directory, and then type command&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 16px; line-height: 25.6px;&quot;&gt;&amp;gt; edksetup --nt32&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
to initialize the working environment. See also:&amp;nbsp;&lt;a class=&quot;internal absent&quot; href=&quot;https://github.com/tianocore/tianocore.github.io/wiki/Windows_systems_ToolChain_Matrix&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #cc0000; text-decoration: none;&quot;&gt;Windows_systems_ToolChain_Matrix&lt;/a&gt;&amp;nbsp;for how to change the TOOL_CHAIN_TAG for supported compiler combinations.&lt;/div&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;2) Type below commands to build platforms (below assumes Microsoft Visual Studio 2008)&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 16px; line-height: 25.6px;&quot;&gt;&amp;gt; build -t VS2008x86&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
Note: There are two methods to select the tool chain (Use Microsoft Visual Studio 2008* as sample):&lt;/div&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;1. Update TOOL_CHAIN_TAG in file Conf/target.txt: TOOL_CHAIN_TAG = VS2008&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;2. Add -t build option in command line: &quot;build -t VS2008 ... &quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 16px; line-height: 25.6px;&quot;&gt;For 32-bit VS2008 on 64-bit WINDOWS OS, VS2008x86 should be selected instead of VS2008. Please refer to tools_def.txt for all supported tool chains and detailed descriptions. (tools_def.txt will be generated at Conf directory after running &quot;edksetup&quot;.)&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;3. Note Microsoft Visual Studio* 2010 is supported with -t VS2010 or -t VS2010x86&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;line-height: 25.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Unix-Like System Configuration&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
&lt;b style=&quot;box-sizing: border-box;&quot;&gt;Ubuntu&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
DistributorID: Ubuntu*&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
Description: Ubuntu 10*&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
Release: Ubuntu 10.10*&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
Codename: Karmic*&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
1. Extract Common Source Code&lt;/div&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;1) Create a working space directory in the build machine, for example, ~/src/&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;2) Extract files in [UDK2014.MyWorkSpace.zip] the working space directory. In this case, it is ~/src/MyWorkSpace where /MyWorkSpace is created.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;3) There are two BaseTools packages, one is for Windows system and another is for UNIX-Like system. Please make sure BaseTools(Unix).tar is used here.&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 16px; line-height: 25.6px;&quot;&gt;2. Generate OpenSSL* Crypto Library Note: This does not need to be done for Nt32 Open file &quot;~/src/MyWorkspace/CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt&quot; and follow the instruction to install OpenSSL* for UEFI building.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
3. See How to Set up Build environment&amp;nbsp;&lt;a class=&quot;internal present&quot; href=&quot;https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;Using EDK II with Native GCC&lt;/a&gt;&amp;nbsp;for newer versions of Linux&lt;/div&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;a) Please note that here the root is &quot;~/src/MyWorkSpace&quot; instead of &quot;~/src/edk2&quot;&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;b) Make sure BaseTools is built and required software like iASL compiler is installed well.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;c) Some operations need switch to user &quot;root&quot; to execute.&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 16px; line-height: 25.6px;&quot;&gt;4. Build Steps *** Nt32 ***&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;1) Open a terminal and type &quot;cd ~/src/MyWorkSpace&quot; to enter the workspace directory.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;2) Initialize the build environment by typing&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 16px; line-height: 25.6px;&quot;&gt;&amp;gt;. edksetup.sh BaseTools&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 0px !important; margin-top: 0px; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;3) Type below commands to build platforms&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 16px; line-height: 25.6px;&quot;&gt;&amp;gt; build -t GCC44&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/6968763640754681636/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2016/01/udk2014-how-to-build.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/6968763640754681636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/6968763640754681636'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2016/01/udk2014-how-to-build.html' title='UDK2014 How to Build'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-5189915527389624112</id><published>2015-11-10T03:02:00.002-08:00</published><updated>2015-11-10T03:02:37.753-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NVME"/><category scheme="http://www.blogger.com/atom/ns#" term="SCSI"/><title type='text'>NVM Express SCSI Command Mappings</title><content type='html'>&lt;a href=&quot;http://www.nvmexpress.org/wp-content/uploads/NVM-Express-SCSI-Translation-Reference-1_1-Gold.pdf&quot;&gt;http://www.nvmexpress.org/wp-content/uploads/NVM-Express-SCSI-Translation-Reference-1_1-Gold.pdf&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN_ci6k50qhai2DwQqU214NajyOQXWmWIOJtdeUo8gIMm_HRaufEEBgpkHq6TuO1iyhCUJ3jlBTVmx6WzLhedorUGsJu7YJu01_Q0XUv5BcQ1YsOFHzdar03eshVZZlz21ogw-4dim_5bv/s1600/Image.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;622&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN_ci6k50qhai2DwQqU214NajyOQXWmWIOJtdeUo8gIMm_HRaufEEBgpkHq6TuO1iyhCUJ3jlBTVmx6WzLhedorUGsJu7YJu01_Q0XUv5BcQ1YsOFHzdar03eshVZZlz21ogw-4dim_5bv/s640/Image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/5189915527389624112/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2015/11/nvm-express-scsi-command-mappings.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/5189915527389624112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/5189915527389624112'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2015/11/nvm-express-scsi-command-mappings.html' title='NVM Express SCSI Command Mappings'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN_ci6k50qhai2DwQqU214NajyOQXWmWIOJtdeUo8gIMm_HRaufEEBgpkHq6TuO1iyhCUJ3jlBTVmx6WzLhedorUGsJu7YJu01_Q0XUv5BcQ1YsOFHzdar03eshVZZlz21ogw-4dim_5bv/s72-c/Image.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2105061709215843737.post-6008312252571654729</id><published>2015-02-10T19:26:00.001-08:00</published><updated>2015-02-10T19:26:13.346-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MAC相關"/><title type='text'>如果你的無線鍵盤與滑鼠不能連接上你的iMac時，該如何處理？</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFlKZ0wml5v-RELl-aZmpY2YxdpWK5UTLRE7jToJls5GV3aPSQbnDMrHOC9SJo2j5Rlmo2jUOu6v3d8CVMl76XlmvnqNLeVyG8U8trmfPLDqmgJw2386bSJ6tdyZnLRvOrvEp6NejPC_T0/s1600/IMAG1956.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFlKZ0wml5v-RELl-aZmpY2YxdpWK5UTLRE7jToJls5GV3aPSQbnDMrHOC9SJo2j5Rlmo2jUOu6v3d8CVMl76XlmvnqNLeVyG8U8trmfPLDqmgJw2386bSJ6tdyZnLRvOrvEp6NejPC_T0/s1600/IMAG1956.jpg&quot; height=&quot;400&quot; width=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
當你的iMac已經過保固，你又不想資付龐大維修費(6000~7000塊)去送修。你可以去買一支&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 16px; line-height: 22px;&quot;&gt;Bluetooth USB裝置(400塊左右)接上iMac，這樣你的&lt;/span&gt;無線鍵盤與滑鼠右可以使用了。&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCuvSijcf1tn3XyEsaBdM5DlIOtKg97cFDXIwt0qtNqh7zgpe4_53GNaoyA_BrXi4qItzPQTgSf8TJ77DDEUlqTKVQ-yLs9PMvn_wGdQg6ba0IcYZ4SXF9rW4yhdQTBB81t6sO4Oe0z0wx/s1600/Bluetooth_USB.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCuvSijcf1tn3XyEsaBdM5DlIOtKg97cFDXIwt0qtNqh7zgpe4_53GNaoyA_BrXi4qItzPQTgSf8TJ77DDEUlqTKVQ-yLs9PMvn_wGdQg6ba0IcYZ4SXF9rW4yhdQTBB81t6sO4Oe0z0wx/s1600/Bluetooth_USB.JPG&quot; height=&quot;200&quot; width=&quot;129&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
MacBook Air與MacBook Pro可以偵測的到&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 16px; line-height: 22px;&quot;&gt;Bluetooth USB&lt;/span&gt;裝置，但無線鍵盤與滑鼠還是連不上。但iMac可以使用此裝置，並可以偵測的到無線鍵盤與滑鼠。&lt;br /&gt;
試試看吧! 省省荷包。&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://samfreetime.blogspot.com/feeds/6008312252571654729/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://samfreetime.blogspot.com/2015/02/imac.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/6008312252571654729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2105061709215843737/posts/default/6008312252571654729'/><link rel='alternate' type='text/html' href='http://samfreetime.blogspot.com/2015/02/imac.html' title='如果你的無線鍵盤與滑鼠不能連接上你的iMac時，該如何處理？'/><author><name>Samuel</name><uri>http://www.blogger.com/profile/15513324406948361458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFlKZ0wml5v-RELl-aZmpY2YxdpWK5UTLRE7jToJls5GV3aPSQbnDMrHOC9SJo2j5Rlmo2jUOu6v3d8CVMl76XlmvnqNLeVyG8U8trmfPLDqmgJw2386bSJ6tdyZnLRvOrvEp6NejPC_T0/s72-c/IMAG1956.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>