<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>Sharing lab3 works by Maziani Sabudin</title>
      <link>https://padlet.com/maziani1963/lab3_selection</link>
      <description>Made with good vibes</description>
      <language>en-us</language>
      <pubDate>2018-10-02 04:23:47 UTC</pubDate>
      <lastBuildDate>2025-11-16 22:36:57 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url>https://padlet-assets.s3.amazonaws.com/icons/Ninja.png</url>
      </image>
      <item>
         <title>Chong Hui Xin</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287937925</link>
         <description><![CDATA[<div>#include&lt;iostream&gt;<br>#include&lt;iomanip&gt;<br>&nbsp;using namespace std;<br>&nbsp;<br>int main ()<br>{<br>	int dec;<br>	cout &lt;&lt; "Enter a decimal number: " &lt;&lt; endl;<br>	cin &gt;&gt; dec;<br>	cout &lt;&lt; "The hexadecimal number is: " &lt;&lt; hex &lt;&lt; dec;<br>	<br>}<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:31:34 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287937925</guid>
      </item>
      <item>
         <title>MUHAMMAD SYAHIR BIN KAMAL FITRI</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287938130</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>using namespace std;<br>int main()<br>{<br> int usage,rate;<br> cout&lt;&lt; "Please enter the Electrical Usage: ";<br> cin&gt;&gt;usage;<br> if (usage&gt;1000)<br> {	<br> rate = usage* 0.45;<br> }<br> else rate = usage * 0.6;<br> cout &lt;&lt;"Total Electric Bill : RM"&lt;&lt; rate;<br> return 0;<br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:33:17 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287938130</guid>
      </item>
      <item>
         <title>DARSHINI A/P SUNDRASIAGARAN</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287938236</link>
         <description><![CDATA[<div>#include&lt;iostream&gt;<br>using namespace std;<br>int main()<br>{<br>	int secElapsed, hours, minutes, seconds;<br>	const int secPerMin = 60;<br>	const int secPerHour = 60 * secPerMin;<br>	cout&lt;&lt;"Please enter the number of second elapsed:&nbsp; ";<br>	cin&gt;&gt;secElapsed;<br>	<br>	hours = secElapsed / secPerHour;<br>	secElapsed = secElapsed % secPerHour;<br>	minutes = secElapsed / secPerMin;<br>	seconds = secElapsed % secPerMin;<br>	cout&lt;&lt;hours&lt;&lt;":"&lt;&lt;minutes&lt;&lt;":"&lt;&lt;seconds&lt;&lt;endl;<br>	return 0;<br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:34:18 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287938236</guid>
      </item>
      <item>
         <title>ONG JOO HOM</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287938786</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br><br>using namespace std;<br><br>int main()<br>{<br>  <br>    float usage;<br>    <br>    float electricBill;<br>    <br>	// get input from user as long as the input is invalid (i.e, negative)<br>    do {<br>        cout &lt;&lt; "Enter the usage in KWH: " ;<br>        cin &gt;&gt; usage;<br>        <br>        if (usage &lt; 0) {<br>            cout &lt;&lt; "Usage cannot be negative, please enter again" &lt;&lt; endl;<br>        }<br>        <br>    } while (usage &lt; 0);<br>       <br>	// determining the rate<br>    if (usage &gt;= 2000) {<br>		electricBill = (999 * 0.6) + (500 * 0.45) + (500 * 0.4) + ((usage - 1999) * (0.35));<br>    } else if (usage &gt;= 1500) {<br>        electricBill = (999 * 0.6) + (500 * 0.45) + ((usage - 1499) * (0.4));<br>    } else if (usage &gt;= 1000) {<br>        electricBill = (999 * 0.6) + ((usage - 999) * 0.45);<br>    } else {<br>        electricBill = usage * 0.6;<br>    }<br>        <br>    cout &lt;&lt; "The electric bill is RM " &lt;&lt; electricBill &lt;&lt; endl;<br>    <br><br>    return 0;<br>}<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:39:32 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287938786</guid>
      </item>
      <item>
         <title>CHEONG LI YUEN</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287938867</link>
         <description><![CDATA[<div>#include&lt;iostream&gt;<br>using namespace std;<br><br>int main()<br>{<br>	int customer_city;	<br>	char B, W;<br>	double gal_last;<br>	double discount_rate = 1;<br>	<br>	cout &lt;&lt; "1 = Boston, 2 = Worcester" &lt;&lt; endl;<br>	cout &lt;&lt; "Customer City(1/2):";<br>	cin &gt;&gt; customer_city;<br>	<br>	cout &lt;&lt; "Number of gallons of oil used last year:";<br>	cin &gt;&gt; gal_last;<br>	<br>	switch (customer_city)<br>	{<br>		case 1 :&nbsp;<br>			switch (gal_last &gt;= 1000)<br>			{<br>		 	case'true' : discount_rate = 0.9;<br>				break;<br>				case'false' : discount_rate = 1;<br>				break;<br>				default : cout &lt;&lt; "Invalid rate";<br>			}<br>		break;<br>		case 2 :<br>			switch(gal_last &gt;= 1200)<br>			{<br>				case'true': discount_rate = 0.91;<br>				break;<br>				case'false': discount_rate = 1;<br>				break;<br>				default : cout &lt;&lt; "Invalid rate";<br>			}<br>		default :&nbsp;<br>			switch(gal_last &gt;= 1500)<br>			{<br>				case'true': discount_rate = 0.9;<br>				break;<br>				case'false' : discount_rate = 1;<br>			}<br>		cout &lt;&lt; "Discount rate is : " &lt;&lt; discount_rate;<br>		<br>		return 0;<br>	}<br>}<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:40:22 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287938867</guid>
      </item>
      <item>
         <title>MUHAMMAD FAKHRUDDIN BIN NORULHAIZY </title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287939108</link>
         <description><![CDATA[<div>// to arrange the order, it is possible to use array<br>#include&lt;iostream&gt;<br><br>using namespace std;<br><br>main()<br>{<br>	int dec,newrt;<br>	cout&lt;&lt;"Enter Decimal Number: "&lt;&lt;endl;<br>	cin&gt;&gt;dec;<br>	<br>	while(dec&gt;0)<br>	{<br>		newrt=dec%16;<br>		dec=dec/16;<br>		<br>		if(newrt&gt;9)<br>		{<br>			switch(newrt)<br>			{<br>				case 10:cout&lt;&lt;"A";<br>				break;<br>				case 11:cout&lt;&lt;"B";<br>				break;<br>				case 12:cout&lt;&lt;"C";<br>				break;<br>				case 13:cout&lt;&lt;"D";<br>				break;<br>				case 14:cout&lt;&lt;"E";<br>				break;<br>				case 15:cout&lt;&lt;"F";<br>				break;<br>			}<br>		}<br>		<br>		else<br>		{<br>			cout&lt;&lt;newrt;<br>		}<br>		<br>	}<br>	<br>	return 0;<br>}<br>+++++++++++++++++++++++++++<br>This version use array to store the arrangement of hex value.<br><br>// C++ program to convert a decimal&nbsp;<br>// number to hexadecimal number&nbsp;<br>&nbsp;&nbsp;<br>#include&lt;iostream&gt;&nbsp;<br>using namespace std;&nbsp;<br>&nbsp;&nbsp;<br>// function to convert decimal to hexadecimal&nbsp;<br>void decToHexa(int n)&nbsp;<br>{&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; // char array to store hexadecimal number&nbsp;<br>&nbsp; &nbsp; char hexaDeciNum[100];&nbsp;<br>&nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; // counter for hexadecimal number array&nbsp;<br>&nbsp; &nbsp; int i = 0;&nbsp;<br>&nbsp; &nbsp; while(n!=0)&nbsp;<br>&nbsp; &nbsp; {&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; // temporary variable to store remainder&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; int temp&nbsp; = 0;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; // storing remainder in temp variable.&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; temp = n % 16;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; // check if temp &lt; 10&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; if(temp &lt; 10)&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; {&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hexaDeciNum[i] = temp + 48;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i++;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; &nbsp; {&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hexaDeciNum[i] = temp + 55;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i++;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; n = n/16;&nbsp;<br>&nbsp; &nbsp; }&nbsp;<br>&nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; // printing hexadecimal number array in reverse order&nbsp;<br>&nbsp; &nbsp; for(int j=i-1; j&gt;=0; j--)&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; hexaDeciNum[j];&nbsp;<br>}&nbsp;</div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:42:33 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287939108</guid>
      </item>
      <item>
         <title>KANG YI QING Q</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287939259</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>#include &lt;string&gt;<br>using namespace std;<br>int main()<br>{<br><br>	 int customer_city;<br>	 double gal_last;<br>	 double discount_rate = 1;<br>	 cout &lt;&lt; "Customer City (1 for Boston and 2 for Worcester)";<br>	cin&gt;&gt; customer_city;<br>	 cout &lt;&lt; "Number of gallons of oil used last year: ";<br>	 cin &gt;&gt; gal_last;<br>	&nbsp;<br>	 switch (customer_city)<br>	 {<br>	 	case 1:<br>	 		switch (gal_last&gt;= 1200)<br>	 		{<br>	 			case true:<br>	 				discount_rate = .9;<br>	 				break;<br>	 			case false:<br>	 				discount_rate = 1;<br>	 				break;<br>					<br>			 }<br>			break;<br>		case 2:<br>			switch (gal_last&gt;=1200)<br>			{<br>				case true:<br>	 				discount_rate = .9;<br>	 				break;<br>	 			case false:<br>	 				discount_rate = 1;<br>	 			break;<br>			}<br>			break;<br>		default:<br>			switch (gal_last&gt;=1200)<br>			{<br>				case true:<br>	 				discount_rate = .9;<br>	 			case false:<br>	 				discount_rate = 1;<br>			}<br>			<br>	}<br><br>	 cout &lt;&lt; "Discount rate is: " &lt;&lt; discount_rate;<br>	 return 0;<br>}<br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:43:50 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287939259</guid>
      </item>
      <item>
         <title>HAROLD BONG JING CHOY Q8</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287939561</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>#include &lt;iomanip&gt;<br><br>using namespace std;<br><br>int main()<br>{<br>	int num;<br>	cout &lt;&lt;"   Present to you by Harold and Eslam."&lt;&lt; endl;<br>	cout &lt;&lt;"_________________________________________;"&lt;&lt; endl &lt;&lt; endl;<br>	cout &lt;&lt; "Enter a number : ";<br>	cin &gt;&gt; num;<br>	cout &lt;&lt; endl &lt;&lt;"Hexadecimal of this number is "&lt;&lt; hex &lt;&lt; num &lt;&lt;".";<br>}<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:45:57 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287939561</guid>
      </item>
      <item>
         <title>WONG HAO JIE Q7</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287939647</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;	<br>using namespace std;<br>int main ()&nbsp;<br>{<br>	char x;<br>	char choice;<br>	do{<br>	cout &lt;&lt; "Enter the character: ";<br>	cin &gt;&gt; x;<br>	cout &lt;&lt; endl &lt;&lt; "The integer equivalent of the character is " &lt;&lt; static_cast&lt;int&gt;(x) &lt;&lt; "." &lt;&lt; endl;<br>	cout &lt;&lt; endl &lt;&lt; "Do you want to continue (Y/N): ";<br>	cin &gt;&gt; choice;<br>	cout &lt;&lt; endl;}<br>	while (choice=='Y');<br>	return 0;<br>}<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:46:42 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287939647</guid>
      </item>
      <item>
         <title>ESLAM AMIN ESMAIL KHALIL Q8</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287939982</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;&nbsp;<br>#include &lt;iomanip&gt;<br>using namespace std;<br>int main() {<br>	int num;<br>	cout &lt;&lt; "Present to you by Harold and Eslam."&lt;&lt; endl;<br>	cout &lt;&lt; "___________________________________"&lt;&lt; endl &lt;&lt; endl;<br>	cout &lt;&lt;"Enter a number : ";<br>	cin &gt;&gt; num;<br>	cout &lt;&lt; endl &lt;&lt;"Hexadecimal of this number is "&lt;&lt; hex &lt;&lt; num &lt;&lt;".";<br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:48:53 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287939982</guid>
      </item>
      <item>
         <title>SUM JOE MING Q5</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287940098</link>
         <description><![CDATA[<div>Y N Y = Purple<br><br></div><div>Y Y N = Yellow<br><br></div><div>N N N = Red<br><br></div><div>Y Y N = Yellow<br><br></div><div>N Y N = Green<br><br></div><div>Y N N = Red<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:50:00 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287940098</guid>
      </item>
      <item>
         <title>NOR ATHIRAH BINTI ABDUL RAHIM Q5</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287940203</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>#include &lt;string&gt;<br>using namespace std;<br>int main()<br>{<br>&nbsp;string mixture;<br>&nbsp;bool red, green, blue;<br>&nbsp;string string_bool;<br>&nbsp;cout &lt;&lt; "Include red in mixture? (y/n) \n";<br>&nbsp;cin &gt;&gt; string_bool;<br>&nbsp;if (string_bool == "y")<br>&nbsp;red = true;<br><br>&nbsp; &nbsp; cout&lt;&lt;"include green in mixture? (y/n) \n";<br>&nbsp;cin &gt;&gt; string_bool;<br>&nbsp;if (string_bool == "y")<br>&nbsp;green = true;<br>&nbsp;cout &lt;&lt; "Include blue in mixture? (y/n) \n";<br>&nbsp;cin &gt;&gt; string_bool;<br>&nbsp;if (string_bool == "y")<br>&nbsp;blue = true;<br>&nbsp;if (!blue &amp;&amp; !green)<br>&nbsp;mixture = "RED";<br>&nbsp;else if (!red &amp;&amp; !blue)<br>&nbsp;mixture = "GREEN";<br>&nbsp;else if (!red &amp;&amp; !green)<br>&nbsp;mixture = "BLUE";<br>&nbsp;else if (red)<br>&nbsp;{<br>&nbsp;if (green || blue)<br>&nbsp;{ if (green &amp;&amp; blue)<br>&nbsp;mixture = "BLACK";<br>&nbsp;else if (green)<br>&nbsp;mixture = "YELLOW";<br>&nbsp;else<br>&nbsp;mixture = "PURPLE";<br>&nbsp;}<br>&nbsp;}<br>&nbsp;else<br>&nbsp;{<br>&nbsp;if (blue &amp;&amp; green)<br>&nbsp;mixture = "CYAN";<br>&nbsp;else<br>&nbsp;mixture = "WHITE";<br>&nbsp;}<br>&nbsp;cout &lt;&lt; "Your mixture is " &lt;&lt; mixture &lt;&lt; "\n";<br><br>&nbsp;return 0;<br>}<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:50:48 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287940203</guid>
      </item>
      <item>
         <title>ANG SEOW WEN</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287940603</link>
         <description><![CDATA[<div>#include&lt;iostream&gt;<br>#include&lt;iomanip&gt;<br>&nbsp;using namespace std;<br>&nbsp;<br>int main ()<br>{<br>	int dec;<br>	cout &lt;&lt; "Enter a decimal number: " &lt;&lt; endl;<br>	cin &gt;&gt; dec;<br>	cout &lt;&lt; "The hexadecimal number is: " &lt;&lt; hex &lt;&lt; dec;<br>	<br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:54:43 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287940603</guid>
      </item>
      <item>
         <title>TENG WEI HERR Q3.2</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287940702</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>using namespace std;<br>int main()<br>{<br>	int usage, rate;<br>	cout &lt;&lt; "Enter Your Electrical Usage in Kilowatt Hours: " ;<br>	cin &gt;&gt; usage;<br>	if (usage&gt;1000)<br>	&nbsp; rate = usage * 0.45;<br>&nbsp; &nbsp; &nbsp; &nbsp; else<br>	&nbsp; rate = usage * 0.6;<br>	cout &lt;&lt;"Total Electric Bill: RM" &lt;&lt; rate;<br>	return 0;<br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:55:30 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287940702</guid>
      </item>
      <item>
         <title>JOWOON KIM Q3</title>
         <author>maziani1963</author>
         <link>https://padlet.com/maziani1963/lab3_selection/wish/287940856</link>
         <description><![CDATA[<div>#include &lt;iostream&gt;<br>using namespace std;<br><br>/*<br>Date: 10/02/2018<br>Name: Jowoon Kim<br>Project name: lab3<br>*/<br><br>int main () {<br>	<br>	char x;<br>	<br>	cout &lt;&lt; "Enter a character: ";<br>	cin &gt;&gt; x;<br>	<br>	cout &lt;&lt; x &lt;&lt; "\'s integer equivalent is " &lt;&lt; static_cast&lt;int&gt;( x );<br>	<br>	return 0;<br>	<br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2018-10-02 04:56:59 UTC</pubDate>
         <guid>https://padlet.com/maziani1963/lab3_selection/wish/287940856</guid>
      </item>
   </channel>
</rss>
