<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>c++sharing by TAI YAO WEI NATHAN</title>
      <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z</link>
      <description></description>
      <language>en-us</language>
      <pubDate>2025-08-13 09:09:30 UTC</pubDate>
      <lastBuildDate>2025-10-01 16:10:02 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url>https://padlet.net/icons/png/1f4d4.png</url>
      </image>
      <item>
         <title>如果问要小数点的</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542247993</link>
         <description><![CDATA[<p>#include &lt;iomanip&gt;</p><p>#include &lt;iostream&gt;</p><p>#include &lt;string&gt;</p><p>using namespace std;</p><p>int main() {</p><p>	double length, width, area, perimeter; //double 是用来store小数点的</p><p>	cout &lt;&lt; "Enter length and wide of rectangle : ";</p><p>		cin &gt;&gt; length;</p><p>		cin &gt;&gt; width;</p><p>		area = length * width;</p><p>		perimeter = 2 * (length + width);</p><p>		cout &lt;&lt; fixed &lt;&lt; setprecision(2); //set两个小数点</p><p>		cout &lt;&lt; "Area= " &lt;&lt; area;</p><p>		cout &lt;&lt; "perimeter= " &lt;&lt; perimeter;</p><p>		return 0;</p><p>}</p>]]></description>
         <enclosure url="" />
         <pubDate>2025-08-13 09:10:08 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542247993</guid>
      </item>
      <item>
         <title>getline(cin,name)/cin.ignore()</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542255387</link>
         <description><![CDATA[<p>#include &lt;iomanip&gt;</p><p>#include &lt;string&gt;</p><p>#include &lt;iostream&gt;</p><p>using namespace std;</p><p>int main () {</p><p>	string name;</p><p>	string gender;</p><p>	int age;</p><p>	cout &lt;&lt; "Your name: ";</p><p>	getline(cin, name); //读完整个 如果没有放 不会读spacing后面的字</p><p>	cout &lt;&lt; "Enter your age: ";</p><p>	cin &gt;&gt; age;</p><p><br/></p><p>	cin.ignore();</p><p><br/></p><p>	cout &lt;&lt; "Enter your gender (M/f): ";</p><p>	getline(cin, gender);</p><p>	cout &lt;&lt; "Name: " &lt;&lt; name &lt;&lt; endl;</p><p>	cout &lt;&lt; "Your Age: " &lt;&lt; age &lt;&lt; endl;</p><p>	cout &lt;&lt; "Gender: " &lt;&lt; gender &lt;&lt; endl;</p><p>	return 0;</p><p>}</p>]]></description>
         <enclosure url="" />
         <pubDate>2025-08-13 09:24:24 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542255387</guid>
      </item>
      <item>
         <title>setprecision()</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542259602</link>
         <description><![CDATA[<p>#include &lt;iomanip&gt;</p><p>#include &lt;iostream&gt;</p><p>#include &lt;string&gt;</p><p>using namespace std;</p><p>int main() {</p><p>	double num = 3.142111;</p><p>	cout &lt;&lt; num &lt;&lt; endl;</p><p>	cout &lt;&lt; setprecision(4) &lt;&lt; num &lt;&lt; endl;</p><p>	cout &lt;&lt; setprecision(3) &lt;&lt; num &lt;&lt; endl;</p><p>	cout &lt;&lt; setprecision(2) &lt;&lt; num &lt;&lt; endl;</p><p>	cout &lt;&lt; setprecision(1) &lt;&lt; num &lt;&lt; endl;</p><p>}</p>]]></description>
         <enclosure url="" />
         <pubDate>2025-08-13 09:32:18 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542259602</guid>
      </item>
      <item>
         <title>AND (&amp;&amp;)
</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542268881</link>
         <description><![CDATA[<p>#include &lt;iostream&gt;</p><p>#include &lt;iomanip&gt;</p><p>#include &lt;string&gt;</p><p>using namespace std;</p><p>int main() {</p><p>    int age;</p><p>    bool hasLicense = true;</p><p>    cout &lt;&lt; "Your age: ";</p><p>    cin &gt;&gt; age;</p><p>    if (age &gt;= 18 &amp;&amp; hasLicense) {</p><p>        cout &lt;&lt; "You can drive.\n";</p><p>    }</p><p>    else {</p><p>        cout &lt;&lt; "You cannot drive.\n";</p><p>    }</p><p>}</p>]]></description>
         <enclosure url="" />
         <pubDate>2025-08-13 09:50:19 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542268881</guid>
      </item>
      <item>
         <title>Not !</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542271350</link>
         <description><![CDATA[<p>#include &lt;iostream&gt;</p><p>#include &lt;iomanip&gt;</p><p>#include &lt;string&gt;</p><p>using namespace std;</p><p>int main() {</p><p>	bool isRaining = true;</p><p>	if (!isRaining) { //! mean false</p><p>		cout &lt;&lt; "Go out without umbrella\n";</p><p>	}</p><p>	else {</p><p>		cout &lt;&lt; "Bring an umbrella before go out\n";</p><p>	}</p><p>}</p>]]></description>
         <enclosure url="" />
         <pubDate>2025-08-13 09:55:51 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542271350</guid>
      </item>
      <item>
         <title> OR (||)</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542274911</link>
         <description><![CDATA[<p>#include &lt;iostream&gt;</p><p>#include &lt;iomanip&gt;</p><p>#include &lt;string&gt;</p><p>using namespace std;</p><p>int main() {</p><p>	bool hasmoney; //bool(boolean is data for true and false)</p><p>	bool hascreditcard;</p><p>	cout &lt;&lt; "Do you have money? (Type 1 for yes 0 for No):  "; //In c++ 1 mean True 0 mean False</p><p>	cin &gt;&gt; hasmoney;</p><p>	cout &lt;&lt; "Did you bring your credit card? (Type 1 for yes 0 for no): ";</p><p>	cin &gt;&gt; hascreditcard;</p><p>	if (hasmoney || hascreditcard) {</p><p>		cout &lt;&lt; "You can buy the item\n";</p><p>	}</p><p>	else {</p><p>		cout &lt;&lt; "Your broke get out!!!!\n",</p><p>	}</p><p>	return 0;</p><p>}</p><p><br/></p>]]></description>
         <enclosure url="" />
         <pubDate>2025-08-13 10:04:08 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542274911</guid>
      </item>
      <item>
         <title>Relation Operators</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542280837</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads-usc1.storage.googleapis.com/4219085257/271a00cb58b4b2a8c0ace8a287a7aaf0/image.png" />
         <pubDate>2025-08-13 10:15:07 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542280837</guid>
      </item>
      <item>
         <title>Data Types</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542283145</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads-usc1.storage.googleapis.com/4219085257/f07addb0742ed843a73b1f995aa18aa6/image.png" />
         <pubDate>2025-08-13 10:19:34 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542283145</guid>
      </item>
      <item>
         <title>Switch Case</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542472108</link>
         <description><![CDATA[<p>#include &lt;iomanip&gt;</p><p>#include &lt;iostream&gt;</p><p>#include &lt;string&gt;</p><p>using namespace std;</p><p>int main() {</p><p>    int day;</p><p>    cout &lt;&lt; "Enter a number (1-7): ";</p><p>    cin &gt;&gt; day;</p><p>    switch (day) {</p><p>    case 1:</p><p>        cout &lt;&lt; "Monday";</p><p>        break;</p><p>    case 2:</p><p>        cout &lt;&lt; "Tuesday";</p><p>        break;</p><p>    case 3:</p><p>        cout &lt;&lt; "Wednesday";</p><p>        break;</p><p>    case 4:</p><p>        cout &lt;&lt; "Thursday";</p><p>        break;</p><p>    case 5:</p><p>        cout &lt;&lt; "Friday";</p><p>        break;</p><p>    case 6:</p><p>        cout &lt;&lt; "Saturday";</p><p>        break;</p><p>    case 7:</p><p>        cout &lt;&lt; "Sunday";</p><p>        break;</p><p>    default:</p><p>        cout &lt;&lt; "Invalid day!";</p><p>    }</p><p>    return 0;</p><p>}</p>]]></description>
         <enclosure url="" />
         <pubDate>2025-08-13 14:47:49 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542472108</guid>
      </item>
      <item>
         <title>Arithmetic Operators</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542473320</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads-usc1.storage.googleapis.com/4219085257/1192d5be87a9250a7cf9190032bba63d/image.png" />
         <pubDate>2025-08-13 14:49:10 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542473320</guid>
      </item>
      <item>
         <title>If else </title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542476311</link>
         <description><![CDATA[<p>#include &lt;iomanip&gt;</p><p>#include &lt;iostream&gt;</p><p>#include &lt;string&gt;</p><p>using namespace std;</p><p>int main() {</p><p>    char grade;</p><p>    cout &lt;&lt; "Enter your grade : " &lt;&lt; endl;</p><p>    cin &gt;&gt; grade;</p><p>    if (grade == 'A') {</p><p>        cout &lt;&lt; "\nExcellent!";</p><p>    }</p><p>    else if (grade == 'B') {</p><p>        cout &lt;&lt; "\nGood job!";</p><p>    }</p><p>    else {</p><p>        cout &lt;&lt; "\nKeep trying!";</p><p>    }</p><p>}</p>]]></description>
         <enclosure url="" />
         <pubDate>2025-08-13 14:52:39 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542476311</guid>
      </item>
      <item>
         <title>Example for applying formula</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542478572</link>
         <description><![CDATA[<p>#include &lt;iomanip&gt;</p><p>#include &lt;iostream&gt;</p><p>#include &lt;string&gt;</p><p>using namespace std;</p><p>int main() {</p><p>    double c, f;</p><p>    cout &lt;&lt; "Enter temperature in Celcius : ";</p><p>    cin &gt;&gt; c;</p><p>    f = 32 + (c * 180 / 100);</p><p>    cout &lt;&lt; "Temperature in Fahrenheit is : " &lt;&lt; f &lt;&lt; endl;</p><p>    return 0;</p><p>}</p>]]></description>
         <enclosure url="" />
         <pubDate>2025-08-13 14:55:26 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542478572</guid>
      </item>
      <item>
         <title>Example of  If else  with  &amp;&amp;</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542483162</link>
         <description><![CDATA[<p>#include &lt;iomanip&gt;</p><p>#include &lt;iostream&gt;</p><p>#include &lt;string&gt;</p><p>using namespace std;</p><p>int main() {</p><p>    int age;</p><p>    bool hasl = true;</p><p>    cout &lt;&lt; "Enter your age : ";</p><p>    cin &gt;&gt; age;</p><p>    if (age &gt;= 17 &amp;&amp; hasl){</p><p>        cout &lt;&lt; "You can apply for car license";</p><p>    }</p><p>    else {</p><p>        cout &lt;&lt; "You are not old enough to apply car license";</p><p>    }</p><p>    return 0;</p><p>}</p>]]></description>
         <enclosure url="" />
         <pubDate>2025-08-13 15:01:17 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542483162</guid>
      </item>
      <item>
         <title>Left to Right</title>
         <author>nathantywpm25</author>
         <link>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542495185</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads-usc1.storage.googleapis.com/4219085257/80487d41f56990d5946081cd456e1648/image.png" />
         <pubDate>2025-08-13 15:17:09 UTC</pubDate>
         <guid>https://padlet.com/nathantywpm25/ylv73ccf4asq0y5z/wish/3542495185</guid>
      </item>
   </channel>
</rss>
