<?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-2208262653834300238</id><updated>2024-03-21T14:23:21.297-07:00</updated><title type='text'>C++ Learning Programming</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jovi8481.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jovi8481.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>jovi848</name><uri>http://www.blogger.com/profile/11965700374623079471</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>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2208262653834300238.post-7030906218125649773</id><published>2014-07-27T13:27:00.001-07:00</published><updated>2015-01-24T12:55:50.080-08:00</updated><title type='text'>Jamaican Translator</title><content type='html'>Check out this cool Jamanica translator translators at &lt;a href=&quot;http://translator.bizjm.com/&quot;&gt;http://translator.bizjm.com/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://jovi8481.blogspot.com/feeds/7030906218125649773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jovi8481.blogspot.com/2014/07/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/7030906218125649773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/7030906218125649773'/><link rel='alternate' type='text/html' href='http://jovi8481.blogspot.com/2014/07/blog-post.html' title='Jamaican Translator'/><author><name>jovi848</name><uri>http://www.blogger.com/profile/11965700374623079471</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-2208262653834300238.post-2279543506764567461</id><published>2012-09-22T11:07:00.001-07:00</published><updated>2012-09-24T20:02:19.555-07:00</updated><title type='text'>C++ Relational and Equality Operators </title><content type='html'>Today will be talking about relational and equality operators, how they work.&lt;br /&gt;
&lt;br /&gt;
Okay so let&#39;s get started. first will will run throught the different&amp;nbsp;&amp;nbsp;relational and equality&amp;nbsp;operators.&lt;br /&gt;
&lt;br /&gt;
So&amp;nbsp;relational and equality&amp;nbsp;operators are symbol that are use to do&amp;nbsp;comparisons and when&amp;nbsp;comparison&amp;nbsp;are done it evaluates as a true or a false for example &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;1&amp;lt;2&lt;/span&gt; will be true because indeed 1 is less than 2. well that how it works basically not hard really. so here are some more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;==&lt;/span&gt; operator means equivalent or equal to&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(1==1)&lt;/span&gt; means that 1 is the&amp;nbsp;equivalent of 1 or what&amp;nbsp;I would&amp;nbsp;say 1 is equal to 1&amp;nbsp;and this is &lt;b&gt;true&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(1==2)&lt;/span&gt; this will return &lt;b&gt;false&lt;/b&gt; because 1 is not equal to 2&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(7==6)&lt;/span&gt; &lt;b&gt;false&lt;/b&gt; as well&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&amp;lt;&lt;/span&gt; operator means less than&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(2 &amp;lt; 4)&lt;/span&gt; 2 is less than 4 so this is &lt;b&gt;true&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(5 &amp;lt; 4)&lt;/span&gt; this is &lt;b&gt;false&lt;/b&gt; because 5 is not less than 4&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(10 &amp;lt; 10)&lt;/span&gt; this is also &lt;b&gt;false &lt;/b&gt;because 10 not less than 10&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&amp;gt;&lt;/span&gt; operator means greater than&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(2 &amp;gt; 1)&lt;/span&gt; is &lt;b&gt;true &lt;/b&gt;because 2 is greater than 1&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(1 &amp;gt; 2)&lt;/span&gt; is &lt;b&gt;false &lt;/b&gt;because 1 in not greater than 2&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(5 &amp;gt; 5)&lt;/span&gt; is also &lt;b&gt;false &lt;/b&gt;because 5 is not greater than 5&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;!=&lt;/span&gt; means not equal to or not&amp;nbsp;equivalent&amp;nbsp;to&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(1 != 2)&lt;/span&gt; is &lt;b&gt;true&lt;/b&gt; because 1 is not equal to 2&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(1 != 1)&lt;/span&gt; this is &lt;b&gt;false&lt;/b&gt; because 1 is equal to 1&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(3 != 4)&lt;/span&gt; is also &lt;b&gt;true&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
Here are some more complex ones&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;((2 *2) &amp;lt; 2)&lt;/span&gt; is &lt;b&gt;false &lt;/b&gt;because 2 x 2 = 4 and 4 is not less than 2&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;((2*2) == (2*2))&lt;/span&gt; this is &lt;b&gt;true &lt;/b&gt;because 2 x 2 = 4 and 4 is indeed equal to 4&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(2 &amp;gt; (1*1))&lt;/span&gt; this is &lt;b&gt;true &lt;/b&gt;because 2 is greater than 1 (1 x 1 = 1)&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(10%2 != 0)&lt;/span&gt; this is &lt;b&gt;false&lt;/b&gt; because 10 mod 2 give a remainder of 0 and 0 is equal to 0&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Okay&amp;nbsp;I&amp;nbsp;think&amp;nbsp;I&amp;nbsp;have bored you&amp;nbsp;enough&amp;nbsp;so lets use the complier now to do it.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Please note that 1 is true and 0 is false in the complier.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;notranslate&quot;&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;

using namespace std;

int main ()
{
    //a simple example of how it work
    //this display 1 if true or 0 if false
    cout &amp;lt;&amp;lt; (2==2)&amp;lt;&amp;lt;endl; // this is true
    cout &amp;lt;&amp;lt; (1==2)&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl; // this is false
    
    
    //some true examples 
    cout &amp;lt;&amp;lt; &quot;(2 &amp;lt; 4) = &quot; &amp;lt;&amp;lt;(2&amp;lt;4)&amp;lt;&amp;lt;endl;
    cout &amp;lt;&amp;lt; &quot;(6 &amp;gt; 5) = &quot; &amp;lt;&amp;lt;(6&amp;gt;5)&amp;lt;&amp;lt;endl;
    cout &amp;lt;&amp;lt; &quot;(4 == 4) = &quot;&amp;lt;&amp;lt;(4==4)&amp;lt;&amp;lt;endl;
    cout &amp;lt;&amp;lt; &quot;(2 != 5) = &quot; &amp;lt;&amp;lt;(2!=5)&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl;
    
    //some false example
    cout &amp;lt;&amp;lt; &quot;(5 &amp;lt; 4) = &quot; &amp;lt;&amp;lt;(5&amp;lt;4)&amp;lt;&amp;lt;endl;
    cout &amp;lt;&amp;lt; &quot;(4 &amp;gt; 5) = &quot; &amp;lt;&amp;lt;(4&amp;gt;5)&amp;lt;&amp;lt;endl;
    cout &amp;lt;&amp;lt; &quot;(3 == 4) = &quot;&amp;lt;&amp;lt;(3==4)&amp;lt;&amp;lt;endl;
    cout &amp;lt;&amp;lt; &quot;(5 != 5) = &quot; &amp;lt;&amp;lt;(5!=5)&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl;

    //some more complex examples
    cout &amp;lt;&amp;lt; &quot;((4 * 3) &amp;lt; 4) = &quot; &amp;lt;&amp;lt;((4*3)&amp;lt;4)&amp;lt;&amp;lt;endl;
    cout &amp;lt;&amp;lt; &quot;((9 - 1) &amp;gt; (4+2)) = &quot; &amp;lt;&amp;lt;((9-1)&amp;gt;(4+2))&amp;lt;&amp;lt;endl;
    cout &amp;lt;&amp;lt; &quot;((10 % 2) == 0) = &quot;&amp;lt;&amp;lt;((10%2)==0)&amp;lt;&amp;lt;endl;
    cout &amp;lt;&amp;lt; &quot;((2 / 2) != 5) = &quot; &amp;lt;&amp;lt;((2/2)!=5)&amp;lt;&amp;lt;endl;

    system(&quot;pause&amp;gt;nul&quot;);
}
&lt;/pre&gt;
&lt;/div&gt;
Here is the output:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&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/AVvXsEjlm6mcQrVvZSmwny3Apo9QkEZb4T7ywekHQ87zBZ5l8_Xw_89X2sl2oo9qbMI9lXIxb8sQ6za5eVpxzacP0PSiUtn7Fv0-tb9SiQP5SXPz92TRPW6-UrJM3tO0b6aqrn7EBGMds91gOle-/s1600/Capture.PNG&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/AVvXsEjlm6mcQrVvZSmwny3Apo9QkEZb4T7ywekHQ87zBZ5l8_Xw_89X2sl2oo9qbMI9lXIxb8sQ6za5eVpxzacP0PSiUtn7Fv0-tb9SiQP5SXPz92TRPW6-UrJM3tO0b6aqrn7EBGMds91gOle-/s1600/Capture.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Please note that your calculation can be complex as you want for example &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;(((4-1)+(5*6)) &amp;lt; (2*4))&lt;/span&gt; this works. you can also compare things that have been compared as well &amp;nbsp;example &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;((4&amp;lt;10) == (4&amp;lt;4)) &lt;/span&gt;this works as well. So there is endless possibilities when using relational operators&lt;br /&gt;
&lt;br /&gt;
So no that you guys understand how these operators work we are going to use&amp;nbsp;variables with these operators now to see how we use them in the real world&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;notranslate&quot;&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;

using namespace std;

int main ()
{
    //declaring varibles
    int num1 = 0;
    int num2 = 0;
    
    //simple example
    cout &amp;lt;&amp;lt; (num1 &amp;lt; num2)&amp;lt;&amp;lt;endl;
    cout &amp;lt;&amp;lt; (num1 &amp;lt; 30)&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl;
    
    //assign new varible to num1 and num2
    num1 = 3;
    num2 = 6;
    
    cout &amp;lt;&amp;lt;&quot;(&quot;&amp;lt;&amp;lt;num1&amp;lt;&amp;lt;&quot; &amp;lt; &quot;&amp;lt;&amp;lt;num2&amp;lt;&amp;lt;&quot;) = &quot;&amp;lt;&amp;lt;(num1&amp;lt;num2)&amp;lt;&amp;lt;endl;//num1 is 3 and 
    //num2 is 6 so 3 &amp;lt; 6 is true
    cout &amp;lt;&amp;lt;&quot;(&quot;&amp;lt;&amp;lt;num2&amp;lt;&amp;lt;&quot; &amp;gt; &quot;&amp;lt;&amp;lt;num1&amp;lt;&amp;lt;&quot;) = &quot;&amp;lt;&amp;lt;(num2&amp;gt;num1)&amp;lt;&amp;lt;endl;//this is true
    
    num1 = 31;
    
    cout &amp;lt;&amp;lt;&quot;(&quot;&amp;lt;&amp;lt;num1&amp;lt;&amp;lt;&quot; == &quot;&amp;lt;&amp;lt;31&amp;lt;&amp;lt;&quot;) = &quot;&amp;lt;&amp;lt;(num1==31)&amp;lt;&amp;lt;endl;//this is true
    cout &amp;lt;&amp;lt;&quot;(&quot;&amp;lt;&amp;lt;num1&amp;lt;&amp;lt;&quot; != (&quot;&amp;lt;&amp;lt;num2&amp;lt;&amp;lt;&quot;*4)) = &quot;&amp;lt;&amp;lt;(num1!=(num2*4))&amp;lt;&amp;lt;endl;//this is true
    

    system(&quot;pause&amp;gt;nul&quot;);
}

&lt;/pre&gt;
&lt;/div&gt;
And the output is shown below:&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/AVvXsEjC3j0T-mgGPU4Pli0cbffHwpGCViq_fB3lRurVutO2XN7d41PxxsAG6PkG9YLM5ckHztn4HdiogKvaMX8X6riZ9wPRqTVDs5XdhJHm3W6Lm_EtY3CDLTdKu9cUJMjm4OVNL9JfWpFlNRG3/s1600/Capture.PNG&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/AVvXsEjC3j0T-mgGPU4Pli0cbffHwpGCViq_fB3lRurVutO2XN7d41PxxsAG6PkG9YLM5ckHztn4HdiogKvaMX8X6riZ9wPRqTVDs5XdhJHm3W6Lm_EtY3CDLTdKu9cUJMjm4OVNL9JfWpFlNRG3/s1600/Capture.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Pretty simple right? an this is the end of my post see you on at the next post and please&amp;nbsp;remember to keep your mind active playing games here are some:

&lt;br /&gt;
&lt;br /&gt;
&lt;script&gt;

video = 0;
function video1()
{
 if(video == 0)
 {
  closeAll();  
  document.getElementById(&quot;video&quot;).innerHTML=&#39;&lt;object width=&quot;640&quot; height=&quot;382&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; id=&quot;videojugplayer&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.videojug.com/player?id=86529846-83ea-82bc-fd27-ff0008c9bd2a&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.videojug.com/player?id=86529846-83ea-82bc-fd27-ff0008c9bd2a&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;640&quot; height=&quot;382&quot; allowFullScreen=&quot;true&quot; allowScriptAccess=&quot;always&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&#39;;
  video =1;
 }
}


game1 = 0;
function game()
{
 if(game1 == 0)
 {
  closeAll();
  document.getElementById(&quot;demo&quot;).innerHTML=&#39;&lt;div align=&quot;center&quot;&gt;&lt;object width=&quot;700&quot; height=&quot;500&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.physicsgames.net/swf/fantasticcontraption.swf&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.physicsgames.net/swf/fantasticcontraption.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;700&quot; height=&quot;500&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;a href=&quot;http://www.physicsgames.net/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&#39;;
  game1 =1;
 }
}

game2 = 0;
function gameTwo()
{
 if(game2 == 0)
 {
  closeAll();
  document.getElementById(&quot;demo2&quot;).innerHTML=&#39;&lt;div align=&quot;center&quot;&gt;&lt;object width=&quot;700&quot; height=&quot;500&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.physicsgames.net/swf/fantasticcontraption2.swf&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.physicsgames.net/swf/fantasticcontraption2.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;700&quot; height=&quot;500&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;a href=&quot;http://www.physicsgames.net/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&#39;;
  game2 =1;
 }
}

game3 = 0;
function gameThree()
{
 if(game3 == 0)
 {
  closeAll();
  document.getElementById(&quot;demo3&quot;).innerHTML=&#39;&lt;div align=&quot;center&quot;&gt;&lt;object width=&quot;600&quot; height=&quot;350&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.physicsgames.net/swf/assembler.swf&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.physicsgames.net/swf/assembler.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;600&quot; height=&quot;350&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;a href=&quot;http://www.physicsgames.net/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&#39;;
  game3 =1;
 }
}

game4 = 0;
function gameFour()
{
 if(game4 == 0)
 {
  closeAll();
  document.getElementById(&quot;demo4&quot;).innerHTML=&#39;&lt;div align=&quot;center&quot;&gt;&lt;object width=&quot;600&quot; height=&quot;400&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.physicsgames.net/swf/assembler2.swf&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.physicsgames.net/swf/assembler2.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;600&quot; height=&quot;400&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;a href=&quot;http://www.physicsgames.net/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&#39;;
  game4 =1;
 }
}

game5 = 0;
function gameFive()
{
 if(game5 == 0)
 {
  closeAll();
  document.getElementById(&quot;demo5&quot;).innerHTML=&#39;&lt;div align=&quot;center&quot;&gt;&lt;object width=&quot;600&quot; height=&quot;400&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.physicsgames.net/swf/assembler3.swf&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.physicsgames.net/swf/assembler3.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;600&quot; height=&quot;400&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;a href=&quot;http://www.physicsgames.net/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&#39;;
  game5 =1;
 }
}

game6 = 0;
function gameSix()
{
 if(game6 == 0)
 {
  closeAll();
  document.getElementById(&quot;demo6&quot;).innerHTML=&#39;&lt;div align=&quot;center&quot;&gt;&lt;object width=&quot;710&quot; height=&quot;488&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.physicsgames.net/swf/cargobridge.swf&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.physicsgames.net/swf/cargobridge.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;710&quot; height=&quot;488&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;a href=&quot;http://www.physicsgames.net/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&#39;;
  game6 =1;
 }
}


function closeAll()
{
 video = 0;
 document.getElementById(&quot;video&quot;).innerHTML = &quot;Watch This Video&quot;;
 game1 = 0;
 document.getElementById(&quot;demo&quot;).innerHTML = &quot;game1&quot;;
 game2 = 0;
 document.getElementById(&quot;demo2&quot;).innerHTML = &quot;game2&quot;;
 game3 = 0;
 document.getElementById(&quot;demo3&quot;).innerHTML = &quot;game3&quot;;
 game4 = 0;
 document.getElementById(&quot;demo4&quot;).innerHTML = &quot;game4&quot;;
 game5 = 0;
 document.getElementById(&quot;demo5&quot;).innerHTML = &quot;game5&quot;;
 game6 = 0;
 document.getElementById(&quot;demo6&quot;).innerHTML = &quot;game6&quot;;
}


&lt;/script&gt;
&lt;div&gt;
&lt;a onclick=&quot;video1()&quot; id=&quot;video&quot;&gt;Watch This Video&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;game()&quot; id=&quot;demo&quot;&gt;Game 1&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;gameTwo()&quot; id=&quot;demo2&quot;&gt;Game 2&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;gameThree()&quot; id=&quot;demo3&quot;&gt;Game 3&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;gameFour()&quot; id=&quot;demo4&quot;&gt;Game 4&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;gameFive()&quot; id=&quot;demo5&quot;&gt;Game 5&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;gameSix()&quot; id=&quot;demo6&quot;&gt;Game 6&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;closeAll()&quot; id=&quot;&quot;&gt;Close Game&lt;/a&gt;

&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jovi8481.blogspot.com/feeds/2279543506764567461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jovi8481.blogspot.com/2012/09/c-relational-and-equality-operators.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/2279543506764567461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/2279543506764567461'/><link rel='alternate' type='text/html' href='http://jovi8481.blogspot.com/2012/09/c-relational-and-equality-operators.html' title='C++ Relational and Equality Operators '/><author><name>jovi848</name><uri>http://www.blogger.com/profile/11965700374623079471</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/AVvXsEjlm6mcQrVvZSmwny3Apo9QkEZb4T7ywekHQ87zBZ5l8_Xw_89X2sl2oo9qbMI9lXIxb8sQ6za5eVpxzacP0PSiUtn7Fv0-tb9SiQP5SXPz92TRPW6-UrJM3tO0b6aqrn7EBGMds91gOle-/s72-c/Capture.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2208262653834300238.post-5075273280490703998</id><published>2012-09-19T11:36:00.002-07:00</published><updated>2012-09-19T11:38:46.483-07:00</updated><title type='text'>Postings</title><content type='html'>Hello everyone having been posting for a will I don&#39;t really see the signification, of my blog so i kind stop production useless you want me to continue all i need is just one one person so say this blog is helping them and I will continue when i get free time from school classes</content><link rel='replies' type='application/atom+xml' href='http://jovi8481.blogspot.com/feeds/5075273280490703998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jovi8481.blogspot.com/2012/09/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/5075273280490703998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/5075273280490703998'/><link rel='alternate' type='text/html' href='http://jovi8481.blogspot.com/2012/09/blog-post.html' title='Postings'/><author><name>jovi848</name><uri>http://www.blogger.com/profile/11965700374623079471</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-2208262653834300238.post-3876494484155505995</id><published>2012-08-23T08:16:00.000-07:00</published><updated>2012-08-23T15:31:48.984-07:00</updated><title type='text'>C++ Arithmetic Operators</title><content type='html'>In C++&amp;nbsp;Arithmetic Operators are symbols that are use to carry out&amp;nbsp;mathematical&amp;nbsp; operation, these symbols include (&lt;b&gt;+&lt;/b&gt;,&lt;b&gt; -&lt;/b&gt;,&lt;b&gt; %&lt;/b&gt;,&lt;b&gt; /&lt;/b&gt;,&lt;b&gt; *&lt;/b&gt;) and they are used for addition, subtraction, getting a&amp;nbsp;remainder,&amp;nbsp;divisions and&amp;nbsp;multiplication.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In this lesson you will learn how to all of them and will we be using&amp;nbsp;variables&amp;nbsp;a lot in these examples but no in all of them to show you the many ways you can use them.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
First&amp;nbsp;we will use them without&amp;nbsp;variables so I am going to print out result of using all the operators this is shown below i won&#39;t be comment on every line of code as before to speed up things.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;notranslate&quot;&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;

using namespace std;

int main()
{
    //addition
    cout &amp;lt;&amp;lt;&quot;Add 5 and 2: &quot; &amp;lt;&amp;lt; 5 + 2&amp;lt;&amp;lt;endl;
    //subtraction
    cout &amp;lt;&amp;lt;&quot;Minus 5 and 2: &quot;&amp;lt;&amp;lt; 5 - 2&amp;lt;&amp;lt;endl;
    //division
    cout &amp;lt;&amp;lt; &quot;Divide 5 and 2: &quot; &amp;lt;&amp;lt; 5 / 2&amp;lt;&amp;lt;endl;
    //multiplication
    cout &amp;lt;&amp;lt; &quot;Multiple 5 and 2: &quot; &amp;lt;&amp;lt; 5 * 2&amp;lt;&amp;lt;endl;
    //modulo
    cout &amp;lt;&amp;lt; &quot;Modulo 5 and 2: remainder &quot; &amp;lt;&amp;lt; 5 % 2&amp;lt;&amp;lt;endl;
    system(&quot;pause&amp;gt;nul&quot;);//doesn&#39;t print press any key to continue... when it pause
}
&lt;/pre&gt;
&lt;/div&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/AVvXsEged6iqHvfDJ9BDDmPz_1RuEAiyZvxsJOWMap2R8b2bm0MivQuhyphenhyphenCG-_UnI_CzEaolQpD9tkXtJaqHbQenbfH4I-7q0mGbm0ZdnjyrgPX8EcRw0in6cbwDUqA0cUMpVhyphenhyphenzxQ8zfrtUdHW8G/s1600/Capture.PNG&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/AVvXsEged6iqHvfDJ9BDDmPz_1RuEAiyZvxsJOWMap2R8b2bm0MivQuhyphenhyphenCG-_UnI_CzEaolQpD9tkXtJaqHbQenbfH4I-7q0mGbm0ZdnjyrgPX8EcRw0in6cbwDUqA0cUMpVhyphenhyphenzxQ8zfrtUdHW8G/s1600/Capture.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
That is basically they work I&#39;m not sure if i can break it down any further than showing you the code. but i will show you example how modulo works or alternative to get modulo. and this is shown in the code below as I said modulo is just the&amp;nbsp;remainder&amp;nbsp;of from a division so that what we are going to do find the remain of a division it may seem useless just because i am not using&amp;nbsp;variables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;notranslate&quot;&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;

using namespace std;

int main()
{
    //modulo
    cout &amp;lt;&amp;lt; &quot;normal modulo 5 and 2: remainder &quot; &amp;lt;&amp;lt; 5 % 2&amp;lt;&amp;lt;endl;
    //alternative modulo 
    cout &amp;lt;&amp;lt; &quot;alernative mod 5 and 2: remainder &quot; &amp;lt;&amp;lt;  5 - (5/2)*2&amp;lt;&amp;lt;endl;
    //with varibles to make it easier to undestand

    //declare varibles
    int num = 5;
    int num1 = 2;
    
    cout &amp;lt;&amp;lt;&quot;alernative with varibles mod 5 and 2: remainder &quot; &amp;lt;&amp;lt; num -(num/num1)*num1;
   system(&quot;pause&amp;gt;nul&quot;);//doesn&#39;t print press any key to continue...
}
&lt;/pre&gt;
&lt;/div&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/AVvXsEhRtNAvjfNm-X4ffAxbn5qGr9nCYAsWLDAHQ2hsvxtggr01ae4Lp2HEzqCinIhtQRdoYHfl1oR2CbfUXuJliFaO8X1o7ai0zGsE3HpJDPR4Adc5aKaSXlGRsV3-Sr-hOxiiURQDUYHNHnpy/s1600/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;56&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRtNAvjfNm-X4ffAxbn5qGr9nCYAsWLDAHQ2hsvxtggr01ae4Lp2HEzqCinIhtQRdoYHfl1oR2CbfUXuJliFaO8X1o7ai0zGsE3HpJDPR4Adc5aKaSXlGRsV3-Sr-hOxiiURQDUYHNHnpy/s400/Capture.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The theory behind this is pretty simple think about it you have 5 and 2 you want the remainder you know it is 1 right so you&amp;nbsp;probably&amp;nbsp;would say hey the&amp;nbsp;remainder&amp;nbsp;is just the difference of the total that is the 5 minus how much times 2 go in 5 and then that times two to find out exact value that it stops at which is 4 because 2 goes in to five 2 time so 2*2 equal 4 and then 5-4 = 1 easy right?&lt;br /&gt;
&lt;br /&gt;
Okay so now i show how to&amp;nbsp;manipulate&amp;nbsp;variables&amp;nbsp;and operators like in line &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cccccc;&quot;&gt;17&lt;/span&gt;&lt;/span&gt; in the above code.&lt;br /&gt;
&lt;br /&gt;
Here is the senearo person want you to calculate the pay for a week for a person who work 40 hours for the week at a rate of dollars per hour&amp;nbsp;in order&amp;nbsp;to do this you need to&amp;nbsp;multiple&amp;nbsp;the hours work by the pay rate.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;notranslate&quot;&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;

using namespace std;

int main()
{
   double hoursWorked = 40.5;//he worked 40 hours
   double payRatePerHour = 20.3;//pay rate is $20.5 a hour
   //we use double datatype because of decimals
   cout &amp;lt;&amp;lt; &quot;His Pay is $&quot; &amp;lt;&amp;lt; hoursWorked * payRatePerHour&amp;lt;&amp;lt;&quot;\n&quot;;
   
   //you could also do this
   //save pay in a new varible
   
   double pay = hoursWorked * payRatePerHour;
   //display varible
   cout &amp;lt;&amp;lt; &quot;His Pay is $&quot; &amp;lt;&amp;lt; pay&amp;lt;&amp;lt;endl;
   
   //you can even do this to show how much the person work 
   //and the pay rate
   cout &amp;lt;&amp;lt; &quot;\nWorked: &quot;&amp;lt;&amp;lt;hoursWorked&amp;lt;&amp;lt; &quot;\nPay Rate: &quot; &amp;lt;&amp;lt;  payRatePerHour &amp;lt;&amp;lt; &quot;\nPay: $&quot; &amp;lt;&amp;lt; pay&amp;lt;&amp;lt;endl;
   
   system(&quot;pause&amp;gt;nul&quot;);//doesn&#39;t print press any key to continue...
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Hope you understand the above, okay so now same seniro but this time the person have sales that he made for the week the&amp;nbsp;commission&amp;nbsp;is 20% &amp;nbsp;of all his sale that means for every thing he sells he get 20% of &amp;nbsp;the price of the item he sold 29 items and the cost of a item is $10 okay so here we go&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;notranslate&quot;&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;

using namespace std;

int main()
{
    
   double hoursWorked = 40.5;//he worked 40 hours
   double payRatePerHour = 20.3;//pay rate is $20.5 a hour
   //we use double datatype because of decimals
   // and always use double when its money too
   
   double numberOfItemsSold = 29;//amount of items sold
   double priceOfItem = 10;//cost for the item
   
   cout &amp;lt;&amp;lt; &quot;His Pay is $&quot; &amp;lt;&amp;lt; hoursWorked * payRatePerHour + 0.20*(numberOfItemsSold*priceOfItem)&amp;lt;&amp;lt;&quot;\n&quot;;
   
   //you could also do this
   //save pay in a new varible
   
   double pay = hoursWorked * payRatePerHour;
   //so we have the pay without the item so we just add commission to it
   pay = pay + 0.20*(numberOfItemsSold*priceOfItem);
   //display varible
   cout &amp;lt;&amp;lt; &quot;His Pay is $&quot; &amp;lt;&amp;lt; pay&amp;lt;&amp;lt;endl;
   
   //you can even do this to show how much the person work 
   //and the pay rate
   cout &amp;lt;&amp;lt; &quot;\nWorked: &quot;&amp;lt;&amp;lt;hoursWorked&amp;lt;&amp;lt; &quot;\nPay Rate: $&quot; &amp;lt;&amp;lt;  payRatePerHour 
        &amp;lt;&amp;lt;&quot;\nCommission: $&quot;&amp;lt;&amp;lt;0.20*(numberOfItemsSold*priceOfItem)
        &amp;lt;&amp;lt; &quot;\nPay: $&quot; &amp;lt;&amp;lt; pay&amp;lt;&amp;lt;endl;
   
   system(&quot;pause&amp;gt;nul&quot;);//doesn&#39;t print press any key to continue...
}
&lt;/pre&gt;
&lt;/div&gt;
Now that we are finish with that I have to explain more on line &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cccccc;&quot;&gt;23&lt;/span&gt;&lt;/span&gt;&amp;nbsp;I this line notice I coded &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;pay&lt;/span&gt; and then say pay is equal to &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;pay + something&lt;/span&gt;&amp;nbsp;what it means that if pay were 20 already and I wanted to add on more on i would have to assign &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;pay&lt;/span&gt; to itself and then add on the extra and thats one way to do it the other way is shown below
&lt;br /&gt;
&lt;div class=&quot;notranslate&quot;&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;pay += 0.20*(numberOfItemsSold*priceOfItem);
//Or with different operator different result tho
pay *= 0.20*(numberOfItemsSold*priceOfItem);
&lt;/pre&gt;
&lt;/div&gt;
operator alone I can use all of the to do it what this simply means is&lt;br /&gt;
I could similarly do this and get the same result and i can not just do it with this 
&lt;br /&gt;
&lt;div class=&quot;notranslate&quot;&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;pay = pay + 0.20*(numberOfItemsSold*priceOfItem);
//Or with different operator different result tho
pay = pay * 0.20*(numberOfItemsSold*priceOfItem);&lt;/pre&gt;
&lt;/div&gt;
Nothing different its just faster to do it that way but you have to get use to it first.
&lt;br /&gt;
&lt;br /&gt;
Please note a&amp;nbsp;variable&#39;s value can be changed after declaring it unless of course you put the key const&amp;nbsp;&amp;nbsp;example&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;notranslate&quot;&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;

using namespace std;

int main()
{
    int a = 10;
    cout &amp;lt;&amp;lt; a &amp;lt;&amp;lt;endl;
    a = 2;
    cout &amp;lt;&amp;lt; a &amp;lt;&amp;lt;endl;
    a = a*a;//a square
    //Or
    a *= a;
    cout &amp;lt;&amp;lt; a;
    //you can&#39;t change if declared as a constant
    const int b = 100;
    //this mean its a read only type if you try 
    //change it complier will give an error
    //example b = 50 is an error because it read only type
    cout &amp;lt;&amp;lt; b;
    system(&quot;pause&amp;gt;nul&quot;);
}&lt;/pre&gt;
&lt;/div&gt;
And if you have problem with the problem solving and critical thinking games can help I grew up of&amp;nbsp;puzzle&amp;nbsp;games and they have made me a good problem solver here are some games you can try out, im not sure if those work on other devices such as mobile or iPad but you can see anyway&lt;br /&gt;
&lt;br /&gt;

&lt;script&gt;

video = 0;
function video1()
{
 if(video == 0)
 {
  closeAll();  
  document.getElementById(&quot;video&quot;).innerHTML=&#39;&lt;object width=&quot;640&quot; height=&quot;382&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; id=&quot;videojugplayer&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.videojug.com/player?id=86529846-83ea-82bc-fd27-ff0008c9bd2a&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.videojug.com/player?id=86529846-83ea-82bc-fd27-ff0008c9bd2a&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;640&quot; height=&quot;382&quot; allowFullScreen=&quot;true&quot; allowScriptAccess=&quot;always&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&#39;;
  video =1;
 }
}


game1 = 0;
function game()
{
 if(game1 == 0)
 {
  closeAll();
  document.getElementById(&quot;demo&quot;).innerHTML=&#39;&lt;div align=&quot;center&quot;&gt;&lt;object width=&quot;700&quot; height=&quot;500&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.physicsgames.net/swf/fantasticcontraption.swf&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.physicsgames.net/swf/fantasticcontraption.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;700&quot; height=&quot;500&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;a href=&quot;http://www.physicsgames.net/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&#39;;
  game1 =1;
 }
}

game2 = 0;
function gameTwo()
{
 if(game2 == 0)
 {
  closeAll();
  document.getElementById(&quot;demo2&quot;).innerHTML=&#39;&lt;div align=&quot;center&quot;&gt;&lt;object width=&quot;700&quot; height=&quot;500&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.physicsgames.net/swf/fantasticcontraption2.swf&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.physicsgames.net/swf/fantasticcontraption2.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;700&quot; height=&quot;500&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;a href=&quot;http://www.physicsgames.net/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&#39;;
  game2 =1;
 }
}

game3 = 0;
function gameThree()
{
 if(game3 == 0)
 {
  closeAll();
  document.getElementById(&quot;demo3&quot;).innerHTML=&#39;&lt;div align=&quot;center&quot;&gt;&lt;object width=&quot;600&quot; height=&quot;350&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.physicsgames.net/swf/assembler.swf&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.physicsgames.net/swf/assembler.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;600&quot; height=&quot;350&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;a href=&quot;http://www.physicsgames.net/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&#39;;
  game3 =1;
 }
}

game4 = 0;
function gameFour()
{
 if(game4 == 0)
 {
  closeAll();
  document.getElementById(&quot;demo4&quot;).innerHTML=&#39;&lt;div align=&quot;center&quot;&gt;&lt;object width=&quot;600&quot; height=&quot;400&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.physicsgames.net/swf/assembler2.swf&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.physicsgames.net/swf/assembler2.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;600&quot; height=&quot;400&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;a href=&quot;http://www.physicsgames.net/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&#39;;
  game4 =1;
 }
}

game5 = 0;
function gameFive()
{
 if(game5 == 0)
 {
  closeAll();
  document.getElementById(&quot;demo5&quot;).innerHTML=&#39;&lt;div align=&quot;center&quot;&gt;&lt;object width=&quot;600&quot; height=&quot;400&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.physicsgames.net/swf/assembler3.swf&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.physicsgames.net/swf/assembler3.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;600&quot; height=&quot;400&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;a href=&quot;http://www.physicsgames.net/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&#39;;
  game5 =1;
 }
}

game6 = 0;
function gameSix()
{
 if(game6 == 0)
 {
  closeAll();
  document.getElementById(&quot;demo6&quot;).innerHTML=&#39;&lt;div align=&quot;center&quot;&gt;&lt;object width=&quot;710&quot; height=&quot;488&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.physicsgames.net/swf/cargobridge.swf&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.physicsgames.net/swf/cargobridge.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;710&quot; height=&quot;488&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;a href=&quot;http://www.physicsgames.net/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&#39;;
  game6 =1;
 }
}


function closeAll()
{
 video = 0;
 document.getElementById(&quot;video&quot;).innerHTML = &quot;Watch This Video&quot;;
 game1 = 0;
 document.getElementById(&quot;demo&quot;).innerHTML = &quot;game1&quot;;
 game2 = 0;
 document.getElementById(&quot;demo2&quot;).innerHTML = &quot;game2&quot;;
 game3 = 0;
 document.getElementById(&quot;demo3&quot;).innerHTML = &quot;game3&quot;;
 game4 = 0;
 document.getElementById(&quot;demo4&quot;).innerHTML = &quot;game4&quot;;
 game5 = 0;
 document.getElementById(&quot;demo5&quot;).innerHTML = &quot;game5&quot;;
 game6 = 0;
 document.getElementById(&quot;demo6&quot;).innerHTML = &quot;game6&quot;;
}


&lt;/script&gt;
&lt;div&gt;
&lt;a onclick=&quot;video1()&quot; id=&quot;video&quot;&gt;Watch This Video&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;game()&quot; id=&quot;demo&quot;&gt;Game 1&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;gameTwo()&quot; id=&quot;demo2&quot;&gt;Game 2&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;gameThree()&quot; id=&quot;demo3&quot;&gt;Game 3&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;gameFour()&quot; id=&quot;demo4&quot;&gt;Game 4&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;gameFive()&quot; id=&quot;demo5&quot;&gt;Game 5&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;gameSix()&quot; id=&quot;demo6&quot;&gt;Game 6&lt;/a&gt;
&lt;br/&gt;
&lt;a onclick=&quot;closeAll()&quot; id=&quot;&quot;&gt;Close Game&lt;/a&gt;

&lt;/div&gt;
&lt;br/&gt;
These are just some of the great games they have out there the more you play pass them the more you can overcome problems you become a better thinker basically. One of my all time favorite puzzle game is &lt;a href=&quot;http://www.armadillorun.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;armadillo run&amp;nbsp;&lt;/a&gt;&amp;nbsp;this game was worth buying you can check out the demo this one really will get you thinking.</content><link rel='replies' type='application/atom+xml' href='http://jovi8481.blogspot.com/feeds/3876494484155505995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jovi8481.blogspot.com/2012/08/c-arithmetic-operators.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/3876494484155505995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/3876494484155505995'/><link rel='alternate' type='text/html' href='http://jovi8481.blogspot.com/2012/08/c-arithmetic-operators.html' title='C++ Arithmetic Operators'/><author><name>jovi848</name><uri>http://www.blogger.com/profile/11965700374623079471</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/AVvXsEged6iqHvfDJ9BDDmPz_1RuEAiyZvxsJOWMap2R8b2bm0MivQuhyphenhyphenCG-_UnI_CzEaolQpD9tkXtJaqHbQenbfH4I-7q0mGbm0ZdnjyrgPX8EcRw0in6cbwDUqA0cUMpVhyphenhyphenzxQ8zfrtUdHW8G/s72-c/Capture.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2208262653834300238.post-4756413432581233465</id><published>2012-08-20T14:10:00.000-07:00</published><updated>2012-08-23T08:25:02.895-07:00</updated><title type='text'>Variable Datatypes in C++</title><content type='html'>&lt;h2&gt;
Variable Names and Values&amp;nbsp;&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
If you&#39;re just&amp;nbsp;beginning&amp;nbsp;programming&amp;nbsp;language you&#39;re probably lost to what exactly I am talking about. So I will try break it down for you. Varibles my words are anything that can hold a value and has a name for example&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;a = 20;//variable is called &#39;a&#39; and the value of that variable is &#39;20&#39;

number = 32;//variable is called &#39;number&#39; and the value of that variable is &#39;32&#39;

anything = 12;//variable is called &#39;anything&#39; and the value of that variable is &#39;12&#39;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
So the above example is a basic idea of what a variable&amp;nbsp;is, So a&amp;nbsp;variable&amp;nbsp;has a name, a value and Datatype (N.B datatype in not in the above example) but we will soon get into that for now we are focusing on the name and value of the&amp;nbsp;variable.&lt;br /&gt;
&lt;br /&gt;
A variable can have&amp;nbsp;any name&amp;nbsp;that you choose as long as its not from a keyword of that&amp;nbsp;programming&amp;nbsp;language, for example in c++ we just learnt about the &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;cout&lt;/span&gt; function we can not have a&amp;nbsp;variable&amp;nbsp;that looks like the below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;cout = 12;//cout is a keyword so you can&#39;t use it as a variable name&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If you do the above you will get a syntax error that mean something is wrong with your code basically as we go along you learn more about other errors&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Something to note is that in C++ like in many programming&amp;nbsp;language&amp;nbsp;variable&amp;nbsp;names are case sensitive or the Capital and common letters matter if a&amp;nbsp;variable&amp;nbsp;is called &#39;name&#39; it&#39;s a totally different&amp;nbsp;variable&amp;nbsp;from &#39;Name&#39; see example below&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;name = 1;
Name = 2;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
So if I decide to display the value in &#39;name&#39; it will show 1, but if I decide to display the&amp;nbsp;value&amp;nbsp;in &#39;Name&#39; it will show 2. This is what&amp;nbsp;I&amp;nbsp;mean when i say two totally different&amp;nbsp;variables&amp;nbsp;some example are below to show that if any letter is change to upper case(Capital letter) or lower case(common letters) it make the&amp;nbsp;variables&amp;nbsp;different&lt;br /&gt;
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;name = 1;
Name = 2;
nAme = 3;
naMe = 4;
namE = 5;
NAME = 6;
NaMe = 7;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
All the above&amp;nbsp;variables&amp;nbsp;are all different hope you finally get the concept and in C++ our&amp;nbsp;variable&amp;nbsp;name SHOULD be lower case, good programming practice not because it will gives you errors (which it wont if its not lower case) but just the fact that you will&amp;nbsp;find out&amp;nbsp;everything will move smoother and faster when everything is uniform and it only looks professional.&lt;br /&gt;
&lt;br /&gt;
So you next question is probably, can I have a space in my&amp;nbsp;variable&#39;s&amp;nbsp;name? The answer is simply &lt;b&gt;NO &lt;/b&gt;what we do is use &lt;a href=&quot;http://en.wikipedia.org/wiki/CamelCase&quot; target=&quot;_blank&quot;&gt;c&lt;b&gt;amel case&lt;/b&gt;&lt;/a&gt;, for example say&amp;nbsp;the name of the&amp;nbsp;variable say the&amp;nbsp;variable&amp;nbsp;name is &#39;date minutes&#39; what we do is shown below
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;dateMinutes = 12;//value has no specific significant purpose in this example&lt;/pre&gt;
&lt;/div&gt;
&lt;h2&gt;
Variables&amp;nbsp;Datatype&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/Data_type&quot; target=&quot;_blank&quot;&gt;Datatype&lt;/a&gt;&amp;nbsp;this is&amp;nbsp;basically&amp;nbsp;the different classifications of the type of values a&amp;nbsp;variable&amp;nbsp;can hold. for example.&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt; &lt;span class=&quot;Apple-style-span&quot;&gt;int &amp;nbsp;a;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;means that&amp;nbsp;variable &#39;a&#39;&amp;nbsp;will and can only store integer values, what are integers? basically these are&amp;nbsp;positive&amp;nbsp;and negative whole numbers eg -1,0,1,2,3,4,5,6. look at the examples below for a better understanding and how&amp;nbsp;datatype are setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;//iostream hearder file

using namespace std;//get all library in the header file

int main()
{
//int has a value that
//ranges -2147483648 to 2147483647
//whole numbers only
int a = 1;

//double has a value that 
//ranges +/- 1.7e +/- 308 (~15 digits)
//contains decimal
double c = 2.333;

//float has a value that 
//ranges +/- 3.4e +/- 38 (~7 digits)
//contains decimal but less whole numbers
//than double
float b = 0.333333;

//bool short for boolean can 
//only hold values true or false or 0 or 1 
bool d = true;

//char short for character can 
//hold only one character at a time
//and char values are enclosed by single quotas
char e = &#39;a&#39;;

//string is more of a class than a datatype
//but what use string is to do is to store text
//and string values are enclosed by double quotas
string f = &quot;Hello World&quot;;


cout &amp;lt;&amp;lt; &quot;a = &quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt;endl; 
cout &amp;lt;&amp;lt; &quot;b = &quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt;endl;
cout &amp;lt;&amp;lt; &quot;c = &quot; &amp;lt;&amp;lt; c &amp;lt;&amp;lt;endl;
cout &amp;lt;&amp;lt; &quot;d = &quot; &amp;lt;&amp;lt; d &amp;lt;&amp;lt;endl;
cout &amp;lt;&amp;lt; &quot;e = &quot; &amp;lt;&amp;lt; e &amp;lt;&amp;lt;endl;
cout &amp;lt;&amp;lt; &quot;f = &quot; &amp;lt;&amp;lt; f &amp;lt;&amp;lt;endl;
system(&quot;pause&quot;);
}


&lt;/pre&gt;
&lt;/div&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/AVvXsEhuPQ6GcUg7IwKMqEX5jk69lfOUzLllRwQfapQ23Gl77ijwTW0MVjOQRtw2uDRpQGSiuzKMC-Q4U0DF11pnfJnUriN2rJNx_jtuoh2SQI9bHWa3Llm1jHmv85MH4AGXlimAUp-w8B1Y-9qM/s1600/Capture.PNG&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/AVvXsEhuPQ6GcUg7IwKMqEX5jk69lfOUzLllRwQfapQ23Gl77ijwTW0MVjOQRtw2uDRpQGSiuzKMC-Q4U0DF11pnfJnUriN2rJNx_jtuoh2SQI9bHWa3Llm1jHmv85MH4AGXlimAUp-w8B1Y-9qM/s1600/Capture.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
Hope you have better understanding of datatype from the example above. we will using the a lot from now on.&lt;br /&gt;
&lt;br /&gt;
Okay so I may have gone a head too far a beginner so i&#39;m gonna try to fix it, So okay the&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;=&lt;/span&gt; means your going to assign a value to a&amp;nbsp;variable in the above code line &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #cccccc;&quot;&gt;10&lt;/span&gt;&amp;nbsp;variable a is being declared, that mean your creating a&amp;nbsp;variable in memory to hold some data in this instance that the datatype is &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;int&lt;/span&gt; so it will store integer values and you will notice that a values is being assign to &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&amp;nbsp;that value is 1, now at line &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #cccccc;&quot;&gt;38&lt;/span&gt;&amp;nbsp; this is where the&amp;nbsp;variable &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;a&lt;/span&gt;&amp;nbsp;is send to be displayed, by using cout. A example of display a&amp;nbsp;variable&amp;nbsp;is just below to help&amp;nbsp;clarify&amp;nbsp;things.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;//iostream hearder file

using namespace std;//get all library in the header file

int main()
{
//declaration of a string 
//with value &quot;HellWorld&quot;
string anyText = &quot;Hello World&quot;;

//declaration of a string 
//with value &quot;How are you?&quot;
string camelCaseText = &quot;How are you?&quot;;

cout &amp;lt;&amp;lt; anyText &amp;lt;&amp;lt;endl;

//with no space between the two varibles
cout &amp;lt;&amp;lt; anyText &amp;lt;&amp;lt; camelCaseText &amp;lt;&amp;lt;endl;

//with space between the two varibles
cout &amp;lt;&amp;lt; anyText &amp;lt;&amp;lt; &quot; &quot; &amp;lt;&amp;lt; camelCaseText &amp;lt;&amp;lt;endl;

//with endl between the two varibles
cout &amp;lt;&amp;lt; anyText &amp;lt;&amp;lt; &quot;\n&quot; &amp;lt;&amp;lt; camelCaseText &amp;lt;&amp;lt;endl;

system(&quot;pause&quot;);
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&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/AVvXsEgzbCH5yiQY09gqCKTN13g_cuI2454MkTsR6BPWyfH_Js3EBwYxkoTs9ASxd9rhUvSGSj0fcre_P1YDKoTfDSeDaHK-pQEYLC14eB7IcHjL-lAKDr7Urni3i6mrG-bDgES5u5JWp2qxTHDn/s1600/Capture.PNG&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/AVvXsEgzbCH5yiQY09gqCKTN13g_cuI2454MkTsR6BPWyfH_Js3EBwYxkoTs9ASxd9rhUvSGSj0fcre_P1YDKoTfDSeDaHK-pQEYLC14eB7IcHjL-lAKDr7Urni3i6mrG-bDgES5u5JWp2qxTHDn/s1600/Capture.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The code explains it self hope you learn something from my lesson.</content><link rel='replies' type='application/atom+xml' href='http://jovi8481.blogspot.com/feeds/4756413432581233465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jovi8481.blogspot.com/2012/08/variable-datatypes-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/4756413432581233465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/4756413432581233465'/><link rel='alternate' type='text/html' href='http://jovi8481.blogspot.com/2012/08/variable-datatypes-in-c.html' title='Variable Datatypes in C++'/><author><name>jovi848</name><uri>http://www.blogger.com/profile/11965700374623079471</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/AVvXsEhuPQ6GcUg7IwKMqEX5jk69lfOUzLllRwQfapQ23Gl77ijwTW0MVjOQRtw2uDRpQGSiuzKMC-Q4U0DF11pnfJnUriN2rJNx_jtuoh2SQI9bHWa3Llm1jHmv85MH4AGXlimAUp-w8B1Y-9qM/s72-c/Capture.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2208262653834300238.post-6979906631897751714</id><published>2012-08-17T09:09:00.002-07:00</published><updated>2012-08-18T08:07:00.066-07:00</updated><title type='text'>Learning C++</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b style=&quot;font-size: 19px; line-height: 15px;&quot;&gt;What is C++?&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;font-size: 19px; line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;A C++ program is a collection of commands, which tell the computer to do &quot;something&quot;. This collection of commands is usually called C++ source code, source code or just code. Commands are either &quot;functions&quot; or &quot;keywords&quot;. Keywords are a basic building block of the language, while functions are, in fact, usually written in terms of simpler functions you&#39;ll see this in our very first program, below. if you confused don&#39;t worry it will all be clear soon because thankfully, C++ provides a great many common functions and keywords that you can use and are easy to learn such &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;for&lt;/span&gt; and&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;while&lt;/span&gt; its&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;basically&amp;nbsp;English&amp;nbsp;in it&#39;s&amp;nbsp;imperative&amp;nbsp;form&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit; font-size: large;&quot;&gt;Getting started&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit; font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;To get you started you&amp;nbsp;&lt;b&gt;need&lt;/b&gt;&amp;nbsp;a IDE in layman&#39;s term this is the thing that you going to use to run and edit your code. Now there are many IDE out there you may pick one of your choice but for now i will be using Dev c++ as my ID you may try&amp;nbsp;&lt;a href=&quot;http://www.codeblocks.org/downloads/26&quot;&gt;Code::Blocks&lt;/a&gt;&amp;nbsp;if you want. if you&amp;nbsp;don&#39;t&amp;nbsp;have already one i suggest you using Dev ++&amp;nbsp;&lt;a href=&quot;http://www.mediafire.com/?uhv6y26r9zi0yat&quot;&gt;click here&lt;/a&gt;&amp;nbsp;to download.&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;If you&#39;re on Linux, you can use g++, and if you&#39;re on Mac OS X, you can use XCode, and by the time were your finish you feel like a programmer before you know it.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;If you chose to get Dev C++ when you install it it should look like the below picture.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;float: none;&quot;&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; font-family: inherit; font-size: 10pt; line-height: 115%;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgshXlyLXOv4SGfq4hVOXOy7jf8WoqsHYwQInjj-Oslb3XclNowSG88EaMOcDqlJ_8WNZCdXbzeb4kWdO5itF63fbKQerihjtTlRJSHu3q5aTcYyxS9ZjCSU7pvMFIDcjdRHZiPqJcFpf97/s1600/dev.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;224&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgshXlyLXOv4SGfq4hVOXOy7jf8WoqsHYwQInjj-Oslb3XclNowSG88EaMOcDqlJ_8WNZCdXbzeb4kWdO5itF63fbKQerihjtTlRJSHu3q5aTcYyxS9ZjCSU7pvMFIDcjdRHZiPqJcFpf97/s400/dev.png&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;After we have finish install the IDE its time to code. we&#39;ll be covering the basics for now these include:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;1. Data types&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;2. Output and input in C++&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;3. While, do while, for loops&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;4. Arrays&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;5. Pointers&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;7. Functions&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;8. Classes&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;And will also take suggest on topic to go&amp;nbsp;through&amp;nbsp;as well&lt;/span&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-5973477571861032&quot;;
/* jovi */
google_ad_slot = &quot;8758949640&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://jovi8481.blogspot.com/feeds/6979906631897751714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jovi8481.blogspot.com/2012/08/learning-c.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/6979906631897751714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/6979906631897751714'/><link rel='alternate' type='text/html' href='http://jovi8481.blogspot.com/2012/08/learning-c.html' title='Learning C++'/><author><name>jovi848</name><uri>http://www.blogger.com/profile/11965700374623079471</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/AVvXsEgshXlyLXOv4SGfq4hVOXOy7jf8WoqsHYwQInjj-Oslb3XclNowSG88EaMOcDqlJ_8WNZCdXbzeb4kWdO5itF63fbKQerihjtTlRJSHu3q5aTcYyxS9ZjCSU7pvMFIDcjdRHZiPqJcFpf97/s72-c/dev.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2208262653834300238.post-1001394900794179191</id><published>2012-08-17T08:26:00.002-07:00</published><updated>2012-08-23T08:20:46.371-07:00</updated><title type='text'>Output in C++</title><content type='html'>For this tutorial we will be using &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;cout&lt;/span&gt;&amp;nbsp;as the output function in C++&lt;br /&gt;
&lt;br /&gt;
So first we need to include our input out put library like this
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Next we need to&amp;nbsp;specify what exactly we will be using in thing library
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;using std::cout;&lt;/pre&gt;
&lt;/div&gt;
or if you want to use everything in the library or libraries you could also use
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;using namespace std;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
So now you will learn a bit about functions that is the &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;main&lt;/span&gt;&amp;nbsp;function of you c++ program a function is a set of instructions that you can call any place the &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;main&lt;/span&gt;&amp;nbsp;function in&amp;nbsp;executed when a program runs&amp;nbsp;but enough of that just know that you will need it for these examples for now later we will talk more about functions&lt;br /&gt;
&lt;br /&gt;
Sorry guys forgot to mention the&amp;nbsp;importance of your semicolons&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;;&lt;/span&gt;&amp;nbsp;this is what tell the complier that you have finished a statement of you miss out you semi colons your program simple wont run&lt;br /&gt;
&lt;br /&gt;
This is you main function&lt;br /&gt;
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;int main(){}&lt;/pre&gt;
&lt;/div&gt;
Within the &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;{&lt;/span&gt; and &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;}&lt;/span&gt; your instructions will go in there.&lt;br /&gt;
&lt;br /&gt;
So a simple program displaying&amp;nbsp;Hello World&amp;nbsp;would look something like&lt;br /&gt;
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt; #include&amp;lt;iostream&amp;gt;//input out put library
using std::cout; // specfiy to use cout the library

int main() // main function of you c++
{
   cout &amp;lt;&amp;lt; &quot;Hello World&quot;; // output Hello World in console 
   system(&quot;pause&quot;);   // pause program  
}
&lt;/pre&gt;
&lt;/div&gt;
If you look at line &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cccccc;&quot;&gt;7&lt;/span&gt;&lt;/span&gt; you notice &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;cout&lt;/span&gt; this is the keyword we use when we want to display something from the istream library in c++ the &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; is telling the complier that there is something im going to be output next and &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: blue;&quot;&gt;&quot;Hello World&quot;&lt;/span&gt; is what is going to be output&lt;br /&gt;
&lt;br /&gt;
if want run it go in dev C++ go to File &amp;gt; New &amp;gt; Source File&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/AVvXsEiDee4CDkR7J470Bv6h6yaXmbXx8zmP-txzWFUc7NTK2DKrduZMBPSCEsrl62MIWO37qNBZXX6TIlo-yoRAOEKvOXwQp33NlpytyxmcxQxY6cL-3BLzzmyNR689X5EOTr3JmnHXgU1igJu1/s1600/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDee4CDkR7J470Bv6h6yaXmbXx8zmP-txzWFUc7NTK2DKrduZMBPSCEsrl62MIWO37qNBZXX6TIlo-yoRAOEKvOXwQp33NlpytyxmcxQxY6cL-3BLzzmyNR689X5EOTr3JmnHXgU1igJu1/s320/Capture.PNG&quot; width=&quot;261&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
A blank page should pop up like below this is where you type you code&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&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/AVvXsEhRuUkJaSLueYBubrGKafNftuOxYBgPdOmojfRigfJHKbgQ-vswvqmxs78d0h614FNurT7noBl0rzVf2Hd222CmBvzEUqcJpMJSd1oSdkwJD58zAYqOdC2JTCZx5GzkY05UN6NH_f9Aqmx7/s1600/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;175&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRuUkJaSLueYBubrGKafNftuOxYBgPdOmojfRigfJHKbgQ-vswvqmxs78d0h614FNurT7noBl0rzVf2Hd222CmBvzEUqcJpMJSd1oSdkwJD58zAYqOdC2JTCZx5GzkY05UN6NH_f9Aqmx7/s400/Capture.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
When your finish it should look like the this&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/AVvXsEjB90dbZdriCZily6OkpAbWhhgMNINw0oNH2Z7QsiGbvYZE7BvpQt95XYr6k1LNgNiLSz-kfgByxVFkGQIEs29EiBBthI0DfGtiG3WhKlYxf4ronDDnQgiYuxpIW7D_HINqkSAZUkoZP5G1/s1600/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB90dbZdriCZily6OkpAbWhhgMNINw0oNH2Z7QsiGbvYZE7BvpQt95XYr6k1LNgNiLSz-kfgByxVFkGQIEs29EiBBthI0DfGtiG3WhKlYxf4ronDDnQgiYuxpIW7D_HINqkSAZUkoZP5G1/s400/Capture.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You can run this by pressing F9 on your&amp;nbsp;keyboard or going to Execute &amp;gt; Compile &amp;amp; Run on &amp;nbsp;the menu bar&lt;br /&gt;
&lt;br /&gt;
Now when you run it will notice a problem the Hello World and the Press any key yo continue... is joined and is on the same line&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/AVvXsEjEYPV4UEvN-g4crJd5jaZ1OMc0kTIEDDaArT33kR1GKL16j7cFwVMTRWkn6HOAOgbbeicpC_rrEsu7kZvQhR0RMFU2a4i5ZPerilGP-cUq89pHC1oOBeZYQizMBhAD6CtUc4K8RSL70qkp/s1600/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;20&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEYPV4UEvN-g4crJd5jaZ1OMc0kTIEDDaArT33kR1GKL16j7cFwVMTRWkn6HOAOgbbeicpC_rrEsu7kZvQhR0RMFU2a4i5ZPerilGP-cUq89pHC1oOBeZYQizMBhAD6CtUc4K8RSL70qkp/s320/Capture.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
But we would prefer to see this&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/AVvXsEieNirNZjAlgWv9uGWvshMxQtc91To9evuyhaAaOEjG3Cf_-cH6ZZiWTek1ZkL7qRg_n67iDewPWajsvqjGM0Kw0kC5RPJCS0cXN5YxDcj9pPWh06xzFibywHUHL09yHYrV4y42ncL8EGyU/s1600/Capture.PNG&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/AVvXsEieNirNZjAlgWv9uGWvshMxQtc91To9evuyhaAaOEjG3Cf_-cH6ZZiWTek1ZkL7qRg_n67iDewPWajsvqjGM0Kw0kC5RPJCS0cXN5YxDcj9pPWh06xzFibywHUHL09yHYrV4y42ncL8EGyU/s1600/Capture.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Well this can be&amp;nbsp;easily&amp;nbsp;achieved&amp;nbsp; for us&amp;nbsp;luckily&amp;nbsp;there are 2 ways we can achieve this&lt;br /&gt;
&lt;br /&gt;
1. is to use the endl this mean enter a new line and is use like shown below&lt;br /&gt;
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;cout &amp;lt;&amp;lt; &quot;Hello World &quot;&amp;lt;&amp;lt;endl;&lt;/pre&gt;
&lt;/div&gt;
and you cout also do this
&amp;lt;/ br&amp;gt;
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;cout &amp;lt;&amp;lt; &quot;Hello World &quot;;
cout &amp;lt;&amp;lt; endl;&lt;/pre&gt;
&lt;/div&gt;
Or

2.
You could use the end line character &#39;\n&#39; as show below

&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;cout &amp;lt;&amp;lt; &quot;Hello World \n&quot;;&lt;/pre&gt;
&lt;/div&gt;
and you cout also do this
&amp;lt;/ br&amp;gt;
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;cout &amp;lt;&amp;lt; &quot;Hello World &quot;;
cout &amp;lt;&amp;lt; &quot;\n&quot;;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
If you decided to do it the first way remember to specify that you will be using &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;endl&lt;/span&gt; this is in the code below on line &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cccccc;&quot;&gt;4&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cccccc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cccccc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;

&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;//input out put library

using std::cout; // specfiy to use cout the library
using std::endl; // enter new line

int main() // main function of you c++
{
   cout &amp;lt;&amp;lt; &quot;Hello World&quot;&amp;lt;&amp;lt;endl; // output Hello World in console 
   system(&quot;pause&quot;);   // pause program  
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Here is the code using &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;\n&lt;/span&gt; instead&lt;br /&gt;
&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;//input out put library

#include&amp;lt;iostream&amp;gt;//input out put library

using std::cout; // specfiy to use cout the library

int main() // main function of you c++
{
   cout &amp;lt;&amp;lt; &quot;Hello World \n&quot;; // output Hello World in console 
   system(&quot;pause&quot;);   // pause program  
}
&lt;/pre&gt;
&lt;/div&gt;
Here another thing you can do you can join text together with the&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: monospace; white-space: pre;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; as shown below this is called &lt;b&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Concatenation&quot;&gt;concatenation&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=notranslate&gt;
&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;iostream&amp;gt;//input out put library

using std::cout; // specfiy to use cout the library

int main() // main function of you c++
{
   cout &amp;lt;&amp;lt; &quot;Hello &quot;&amp;lt;&amp;lt;&quot;World \n&quot;; // output Hello World in console 
   system(&quot;pause&quot;);   // pause program  
}
&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jovi8481.blogspot.com/feeds/1001394900794179191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jovi8481.blogspot.com/2012/08/output-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/1001394900794179191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2208262653834300238/posts/default/1001394900794179191'/><link rel='alternate' type='text/html' href='http://jovi8481.blogspot.com/2012/08/output-in-c.html' title='Output in C++'/><author><name>jovi848</name><uri>http://www.blogger.com/profile/11965700374623079471</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/AVvXsEiDee4CDkR7J470Bv6h6yaXmbXx8zmP-txzWFUc7NTK2DKrduZMBPSCEsrl62MIWO37qNBZXX6TIlo-yoRAOEKvOXwQp33NlpytyxmcxQxY6cL-3BLzzmyNR689X5EOTr3JmnHXgU1igJu1/s72-c/Capture.PNG" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>A2, Jamaica</georss:featurename><georss:point>18.023139488973126 -77.62664794921875</georss:point><georss:box>17.781549488973127 -77.942504949218744 18.264729488973124 -77.310790949218756</georss:box></entry></feed>