<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>大樂透程式開發流程 by 10821吳東鴻</title>
      <link>https://padlet.com/s11030142/njygzgf0hu1s1a46</link>
      <description>111(2)高二C班群課程</description>
      <language>en-us</language>
      <pubDate>2023-04-20 01:49:55 UTC</pubDate>
      <lastBuildDate>2023-06-14 16:57:08 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title></title>
         <author>s11030142</author>
         <link>https://padlet.com/s11030142/njygzgf0hu1s1a46/wish/2560958807</link>
         <description><![CDATA[<div>int main() {<br>&nbsp; &nbsp; int evenNumbers[6];<br>&nbsp; &nbsp; srand(time(NULL));&nbsp; // 設定隨機種子<br>&nbsp; &nbsp; for (int i = 0; i &lt; 6; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; int randomNumber = rand() % 50 + 1;&nbsp; // 隨機產生 1-50 的偶數<br>&nbsp; &nbsp; &nbsp; &nbsp; evenNumbers[i] = randomNumber * 2;&nbsp; // 轉換為 1-100 的偶數</div>]]></description>
         <enclosure url="https://onlinegdb.com/5lVasy_AT" />
         <pubDate>2023-04-20 01:58:24 UTC</pubDate>
         <guid>https://padlet.com/s11030142/njygzgf0hu1s1a46/wish/2560958807</guid>
      </item>
      <item>
         <title></title>
         <author>s11030142</author>
         <link>https://padlet.com/s11030142/njygzgf0hu1s1a46/wish/2560960566</link>
         <description><![CDATA[<div>// 氣泡排序法<br>&nbsp; &nbsp; for (int i = 0; i &lt; 5; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; 5 - i; j++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (result[j] &gt; result[j + 1]) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int temp = result[j];<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result[j] = result[j + 1];<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result[j + 1] = temp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>]]></description>
         <enclosure url="https://onlinegdb.com/bx2YZ2er3" />
         <pubDate>2023-04-20 02:00:10 UTC</pubDate>
         <guid>https://padlet.com/s11030142/njygzgf0hu1s1a46/wish/2560960566</guid>
      </item>
      <item>
         <title></title>
         <author>s11030142</author>
         <link>https://padlet.com/s11030142/njygzgf0hu1s1a46/wish/2560964623</link>
         <description><![CDATA[<div>int main() {<br>&nbsp; &nbsp; int n; // 抽出期數<br>&nbsp; &nbsp; cout &lt;&lt; "需要抽出幾期？";<br>&nbsp; &nbsp; cin &gt;&gt; n;<br>&nbsp; &nbsp; srand(time(0)); // 以當前時間作為亂數種子<br>&nbsp; &nbsp; for (int i = 0; i &lt; n; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; int lottery[6]; // 儲存每期中的六個號碼<br>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; 6; j++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lottery[j] = rand() % 49 + 1; // 產生一個介於 1~49 之間的亂數<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int k = 0; k &lt; j; k++) { // 檢查是否有重覆的號碼<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (lottery[k] == lottery[j]) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; j--;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>]]></description>
         <enclosure url="https://onlinegdb.com/zKSgSk4pL" />
         <pubDate>2023-04-20 02:03:42 UTC</pubDate>
         <guid>https://padlet.com/s11030142/njygzgf0hu1s1a46/wish/2560964623</guid>
      </item>
      <item>
         <title></title>
         <author>s11030142</author>
         <link>https://padlet.com/s11030142/njygzgf0hu1s1a46/wish/2560964689</link>
         <description><![CDATA[<div>int main() {<br>&nbsp; &nbsp; // 設定亂數種子為目前時間<br>&nbsp; &nbsp; srand(time(NULL));<br><br>&nbsp; &nbsp; // 宣告一個 vector 來存放樂透號碼<br>&nbsp; &nbsp; vector&lt;int&gt; lotto;<br><br>&nbsp; &nbsp; // 產生 6 個樂透號碼<br>&nbsp; &nbsp; for (int i = 0; i &lt; 6; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; int num;<br>&nbsp; &nbsp; &nbsp; &nbsp; bool is_duplicate;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; do {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 產生亂數<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num = rand() % 49 + 1;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 檢查是否已經存在於 lotto 中<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; is_duplicate = find(lotto.begin(), lotto.end(), num) != lotto.end();<br>&nbsp; &nbsp; &nbsp; &nbsp; } while (is_duplicate);<br><br>&nbsp; &nbsp; &nbsp; &nbsp; // 將產生的號碼加入 lotto 中<br>&nbsp; &nbsp; &nbsp; &nbsp; lotto.push_back(num);<br>&nbsp; &nbsp; }</div>]]></description>
         <enclosure url="https://onlinegdb.com/MxLD6JkwB" />
         <pubDate>2023-04-20 02:03:45 UTC</pubDate>
         <guid>https://padlet.com/s11030142/njygzgf0hu1s1a46/wish/2560964689</guid>
      </item>
      <item>
         <title></title>
         <author>s11030142</author>
         <link>https://padlet.com/s11030142/njygzgf0hu1s1a46/wish/2560965362</link>
         <description><![CDATA[<div>int main() {<br>&nbsp; &nbsp; const int NUM_PERIODS = 10; // 共產生十期的開獎號碼<br>&nbsp; &nbsp; int lottery[NUM_PERIODS][7]; // 儲存每期中的六個號碼及特別號<br>&nbsp; &nbsp; srand(time(0)); // 以當前時間作為亂數種子<br>&nbsp; &nbsp; for (int i = 0; i &lt; NUM_PERIODS; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; 6; j++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lottery[i][j] = rand() % 49 + 1; // 產生一個介於 1~49 之間的亂數<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int k = 0; k &lt; j; k++) { // 檢查是否有重覆的號碼<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (lottery[i][k] == lottery[i][j]) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; j--;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>]]></description>
         <enclosure url="https://onlinegdb.com/iPTdlNEXQ" />
         <pubDate>2023-04-20 02:04:21 UTC</pubDate>
         <guid>https://padlet.com/s11030142/njygzgf0hu1s1a46/wish/2560965362</guid>
      </item>
      <item>
         <title></title>
         <author>s11030142</author>
         <link>https://padlet.com/s11030142/njygzgf0hu1s1a46/wish/2560966503</link>
         <description><![CDATA[<div>char answer = 'Y';<br>&nbsp; &nbsp; while (answer == 'Y') {<br>&nbsp; &nbsp; &nbsp; &nbsp; // 輸入期別和對獎號碼<br>&nbsp; &nbsp; &nbsp; &nbsp; string period, prizeNumber;<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; "查詢的期別：";<br>&nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; period;<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; "對獎的號碼：";<br>&nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; prizeNumber;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; // 判斷是否中獎<br>&nbsp; &nbsp; &nbsp; &nbsp; bool isWinning = (period == "第X期" &amp;&amp; prizeNumber == "中獎號碼");<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; period &lt;&lt; ":" &lt;&lt; (isWinning ? "中獎" : "沒中獎") &lt;&lt; endl;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; // 詢問是否繼續查詢<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; "是否要繼續(Y/N)：";<br>&nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; answer;<br>&nbsp; &nbsp; &nbsp; &nbsp; answer = toupper(answer); // 轉換成大寫字母<br>&nbsp; &nbsp; }</div>]]></description>
         <enclosure url="https://onlinegdb.com/fb-qNEMiE" />
         <pubDate>2023-04-20 02:05:20 UTC</pubDate>
         <guid>https://padlet.com/s11030142/njygzgf0hu1s1a46/wish/2560966503</guid>
      </item>
   </channel>
</rss>
