<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>我 流行的 Padlet by 20507許昀廷</title>
      <link>https://padlet.com/s11035122/mzsewmneqdjw2ggh</link>
      <description></description>
      <language>en-us</language>
      <pubDate>2023-03-30 01:27:29 UTC</pubDate>
      <lastBuildDate>2026-03-14 18:29:49 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>取亂數</title>
         <author>s11035122</author>
         <link>https://padlet.com/s11035122/mzsewmneqdjw2ggh/wish/2537563585</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>using namespace std;<br><br>int main() {<br>&nbsp; &nbsp; int even_nums[6];<br>&nbsp; &nbsp; srand(time(0));&nbsp;<br>&nbsp; &nbsp; int count = 0;<br>&nbsp; &nbsp; while (count &lt; 6) {<br>&nbsp; &nbsp; &nbsp; &nbsp; int num = rand() % 100 + 1;&nbsp; &nbsp; //先產生1-100的亂數<br>&nbsp; &nbsp; &nbsp; &nbsp; if (num % 2 == 0) {&nbsp; &nbsp; //條件須為偶數<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; even_nums[count] = num;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count++;<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; for (int i = 0; i &lt; 6; i++) { &nbsp; //等到陣列裡達到6個<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; even_nums[i] &lt;&lt; " ";<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; cout &lt;&lt; endl;<br>&nbsp; &nbsp; return 0;<br>}<br><br><br></div>]]></description>
         <enclosure url="https://onlinegdb.com/LKgGMbA7Jz" />
         <pubDate>2023-03-30 01:30:52 UTC</pubDate>
         <guid>https://padlet.com/s11035122/mzsewmneqdjw2ggh/wish/2537563585</guid>
      </item>
      <item>
         <title>亂數的排序</title>
         <author>s11035122</author>
         <link>https://padlet.com/s11035122/mzsewmneqdjw2ggh/wish/2537564797</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>#include &lt;cstdlib&gt;&nbsp;<br>#include &lt;ctime&gt;&nbsp;<br><br>using namespace std;<br><br>int main() {<br>&nbsp; &nbsp; //亂數數量取6個<br>&nbsp; &nbsp; const int SIZE = 6;&nbsp;<br>&nbsp; &nbsp; int result[SIZE];<br><br>&nbsp; &nbsp;<br>&nbsp; &nbsp; srand(time(NULL));<br><br>&nbsp; &nbsp; // 產生不重複亂數並存入result陣列中<br>&nbsp; &nbsp; for (int i = 0; i &lt; SIZE; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; result[i] = rand() % 49 + 1;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; // 確保不會重複<br>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; i; j++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (result[i] == result[j]) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i--;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br><br><br><br>&nbsp; &nbsp; // 使用氣泡排序法按照數字大小排列<br>&nbsp; &nbsp; for (int i = 0; i &lt; SIZE - 1; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; SIZE - i - 1; 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; }<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; // 印出結果<br>&nbsp; &nbsp; cout &lt;&lt; "result: ";<br>&nbsp; &nbsp; for (int i = 0; i &lt; SIZE; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; result[i] &lt;&lt; " ";<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; cout &lt;&lt; endl;<br><br>&nbsp; &nbsp; return 0;<br>}<br><br></div>]]></description>
         <enclosure url="https://onlinegdb.com/iziYwi86C" />
         <pubDate>2023-03-30 01:31:32 UTC</pubDate>
         <guid>https://padlet.com/s11035122/mzsewmneqdjw2ggh/wish/2537564797</guid>
      </item>
      <item>
         <title>亂數不重複</title>
         <author>s11035122</author>
         <link>https://padlet.com/s11035122/mzsewmneqdjw2ggh/wish/2537566668</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>#include &lt;cstdlib&gt;&nbsp;<br>#include &lt;ctime&gt;&nbsp;<br><br>using namespace std;<br><br>int main() {<br>&nbsp; &nbsp; //亂數數量取6個<br>&nbsp; &nbsp; const int SIZE = 6;&nbsp;<br>&nbsp; &nbsp; int result[SIZE];<br><br>&nbsp; &nbsp;<br>&nbsp; &nbsp; srand(time(NULL));<br><br>&nbsp; &nbsp; // 產生不重複亂數並存入result陣列中<br>&nbsp; &nbsp; for (int i = 0; i &lt; SIZE; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; result[i] = rand() % 49 + 1;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; // 確保不會重複<br>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; i; j++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (result[i] == result[j]) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i--;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br><br><br><br>&nbsp; &nbsp; // 使用氣泡排序法按照數字大小排列<br>&nbsp; &nbsp; for (int i = 0; i &lt; SIZE - 1; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; SIZE - i - 1; 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; }<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; // 印出結果<br>&nbsp; &nbsp; cout &lt;&lt; "result: ";<br>&nbsp; &nbsp; for (int i = 0; i &lt; SIZE; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; result[i] &lt;&lt; " ";<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; cout &lt;&lt; endl;<br><br>&nbsp; &nbsp; return 0;<br>}<br><br></div>]]></description>
         <enclosure url="https://onlinegdb.com/winQM344R" />
         <pubDate>2023-03-30 01:32:53 UTC</pubDate>
         <guid>https://padlet.com/s11035122/mzsewmneqdjw2ggh/wish/2537566668</guid>
      </item>
      <item>
         <title>產生N組號碼</title>
         <author>s11035122</author>
         <link>https://padlet.com/s11035122/mzsewmneqdjw2ggh/wish/2537567583</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>using namespace std;<br><br>#include &lt;iostream&gt;<br>#include &lt;cstdlib&gt;<br>#include &lt;ctime&gt;<br>using namespace std;<br><br>const int MAX_NUM = 99; // 數字範圍上限<br>const int L_NUM = 6; // 大樂透號碼的個數<br><br>int main() {<br>&nbsp; &nbsp; int n; // 使用者輸入的需要產生的大樂透號碼的組數<br><br>&nbsp; &nbsp; // 詢問使用者需要產生幾期樂透號碼<br>&nbsp; &nbsp; cout &lt;&lt; "請問需要產生幾期樂透號碼？" &lt;&lt; endl;<br>&nbsp; &nbsp; cin &gt;&gt; n;<br><br>&nbsp; &nbsp; // 產生n組大樂透號碼<br>&nbsp; &nbsp; for (int i = 0; i &lt; n; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; int lotto[L_NUM]; // 用來存一期大樂透號碼的陣列<br><br>&nbsp; &nbsp; &nbsp; &nbsp; // 產生一組不重複的大樂透號碼<br>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; L_NUM; j++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bool is_duplicate; // 用來標記新產生的亂數是否與前面的重複<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; do {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; is_duplicate = false; // 預設新產生的亂數不重複<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lotto[j] = rand() % MAX_NUM + 1; // 產生1-99之間的亂數<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 檢查新產生的亂數是否與之前的重複<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int k = 0; k &lt; j; k++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (lotto[j] == lotto[k]) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; is_duplicate = true;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } while (is_duplicate); // 如果新產生的亂數重複，則需要重新產生一個新的亂數<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br><br>&nbsp; &nbsp; &nbsp; &nbsp; // 將一組大樂透號碼印出來<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; "第" &lt;&lt; i+1 &lt;&lt; "期大樂透號碼：";<br>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; L_NUM; j++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; lotto[j] &lt;&lt; " ";<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; endl;<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; return 0;<br>}</div>]]></description>
         <enclosure url="https://onlinegdb.com/XG3ngzNed" />
         <pubDate>2023-03-30 01:33:37 UTC</pubDate>
         <guid>https://padlet.com/s11035122/mzsewmneqdjw2ggh/wish/2537567583</guid>
      </item>
      <item>
         <title>加上特別號 / 查詢期別</title>
         <author>s11035122</author>
         <link>https://padlet.com/s11035122/mzsewmneqdjw2ggh/wish/2569014041</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>#include &lt;cstdlib&gt;<br>#include &lt;ctime&gt;<br>using namespace std;<br><br>int main()<br>{<br>&nbsp; &nbsp; srand(time(NULL)); // 設定亂數種子為當前時間<br>&nbsp; &nbsp; const int MAX_NUM = 49; // 大樂透號碼最大值<br>&nbsp; &nbsp; const int SPECIAL_NUM_MAX = 8; // 特別號最大值<br>&nbsp; &nbsp; const int NUMS_PER_DRAW = 6; // 每期抽出的號碼數量<br>&nbsp; &nbsp; const int DRAW_COUNT = 10; // 抽出期數<br>&nbsp; &nbsp; int nums[DRAW_COUNT][NUMS_PER_DRAW]; // 存放大樂透號碼<br>&nbsp; &nbsp; int special_nums[DRAW_COUNT]; // 存放特別號<br><br>&nbsp; &nbsp; // 隨機產生十期大樂透號碼及特別號<br>&nbsp; &nbsp; for (int i = 0; i &lt; DRAW_COUNT; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; // 產生六個不重複的號碼<br>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; NUMS_PER_DRAW; j++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bool is_duplicated = true;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (is_duplicated) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; is_duplicated = false;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nums[i][j] = rand() % MAX_NUM + 1; // 產生 1~49 的亂數號碼<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int k = 0; k &lt; j; k++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (nums[i][j] == nums[i][k]) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; is_duplicated = true; // 產生重複的號碼，需要重新產生<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; // 產生特別號<br>&nbsp; &nbsp; &nbsp; &nbsp; special_nums[i] = rand() % SPECIAL_NUM_MAX + 1; // 產生 1~8 的亂數號碼<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; // 讓使用者輸入要查詢的期數<br>&nbsp; &nbsp; int target_draw;<br>&nbsp; &nbsp; cout &lt;&lt; "請輸入要查詢的大樂透期數（1~" &lt;&lt; DRAW_COUNT &lt;&lt; "）：";<br>&nbsp; &nbsp; cin &gt;&gt; target_draw;<br><br>&nbsp; &nbsp; // 檢查輸入的期數是否有效<br>&nbsp; &nbsp; if (target_draw &lt; 1 || target_draw &gt; DRAW_COUNT) {<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; "輸入的期數無效！" &lt;&lt; endl;<br>&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; // 顯示輸入期數的大樂透號碼及特別號<br>&nbsp; &nbsp; cout &lt;&lt; "第 " &lt;&lt; target_draw &lt;&lt; " 期：";<br>&nbsp; &nbsp; for (int i = 0; i &lt; NUMS_PER_DRAW; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; nums[target_draw - 1][i] &lt;&lt; " ";<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; cout &lt;&lt; "特別號：" &lt;&lt; special_nums[target_draw - 1] &lt;&lt; endl;<br><br>&nbsp; &nbsp; return 0;<br>}<br><br></div>]]></description>
         <enclosure url="https://onlinegdb.com/77-ftPVz8" />
         <pubDate>2023-04-26 15:49:32 UTC</pubDate>
         <guid>https://padlet.com/s11035122/mzsewmneqdjw2ggh/wish/2569014041</guid>
      </item>
      <item>
         <title>單一期別/號碼的對獎</title>
         <author>s11035122</author>
         <link>https://padlet.com/s11035122/mzsewmneqdjw2ggh/wish/2569021450</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>#include &lt;cstdlib&gt;<br>#include &lt;ctime&gt;<br>using namespace std;<br><br>int main() {<br>&nbsp; &nbsp; srand(time(NULL)); // 初始化亂數種子<br><br>&nbsp; &nbsp; // 產生10期大樂透號碼<br>&nbsp; &nbsp; const int MAX_NUM = 49; // 大樂透最大號碼<br>&nbsp; &nbsp; const int NUM_PER_SET = 6; // 每組號碼數量<br>&nbsp; &nbsp; const int NUM_SETS = 10; // 號碼組數量<br>&nbsp; &nbsp; int lotto[NUM_SETS][NUM_PER_SET]; // 用二維陣列存放號碼<br>&nbsp; &nbsp; for (int i = 0; i &lt; NUM_SETS; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; "第" &lt;&lt; i + 1 &lt;&lt; "期： ";<br>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; NUM_PER_SET; j++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int num = rand() % MAX_NUM + 1; // 隨機產生號碼<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lotto[i][j] = num; // 存放到陣列中<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; num &lt;&lt; " ";<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; endl;<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; // 選出一組中獎號碼<br>&nbsp; &nbsp; int winningNum[NUM_PER_SET]; // 存放中獎號碼<br>&nbsp; &nbsp; cout &lt;&lt; endl &lt;&lt; "中獎號碼： ";<br>&nbsp; &nbsp; for (int i = 0; i &lt; NUM_PER_SET; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; int num = rand() % MAX_NUM + 1; // 隨機產生號碼<br>&nbsp; &nbsp; &nbsp; &nbsp; winningNum[i] = num; // 存放到陣列中<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; num &lt;&lt; " ";<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; cout &lt;&lt; endl;<br><br>&nbsp; &nbsp; char choice = 'Y';<br>&nbsp; &nbsp; while (choice == 'Y') {<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; endl &lt;&lt; "請輸入您要查詢的期數或一組號碼： ";<br>&nbsp; &nbsp; &nbsp; &nbsp; int input[NUM_PER_SET];<br>&nbsp; &nbsp; &nbsp; &nbsp; bool isNumSet = true; // 判斷是否為一組號碼<br>&nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; NUM_PER_SET; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; input[i];<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (input[i] &lt; 1 || input[i] &gt; MAX_NUM) { // 輸入號碼超出範圍<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isNumSet = false;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br><br>&nbsp; &nbsp; &nbsp; &nbsp; if (isNumSet) { // 輸入的是一組號碼<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bool isWinningNum = true;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; NUM_PER_SET; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (input[i] != winningNum[i]) { // 有任一數字不相同即非中獎號碼<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isWinningNum = false;<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; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (isWinningNum) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; "您輸入的號碼中獎了！" &lt;&lt; endl;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; "您輸入的號碼沒有中獎。" &lt;&lt; endl;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int period = input[0];<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (period &lt; 1 || period &gt; NUM_SETS) { // 輸入期數超出範圍<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; "查無此期。" &lt;&lt; endl;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; "第" &lt;&lt; period &lt;&lt; "期： ";<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; NUM_PER_SET; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; lotto[period - 1][i] &lt;&lt; " ";<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; endl;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br><br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; "是否要繼續？（Y/N）";<br>&nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; choice;<br>&nbsp; &nbsp; &nbsp; &nbsp; if (choice != 'Y' &amp;&amp; choice != 'y') {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; return 0;<br>}</div>]]></description>
         <enclosure url="https://onlinegdb.com/tEg1dTw1h" />
         <pubDate>2023-04-26 15:55:08 UTC</pubDate>
         <guid>https://padlet.com/s11035122/mzsewmneqdjw2ggh/wish/2569021450</guid>
      </item>
   </channel>
</rss>
