<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Coding for begginers</title>
	<atom:link href="http://codingzero.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codingzero.wordpress.com</link>
	<description>learn to code through examples!</description>
	<lastBuildDate>Sun, 12 Dec 2010 13:48:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='codingzero.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/4bf47d4e45792b34d18cfeb66f6db3eb?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Coding for begginers</title>
		<link>http://codingzero.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://codingzero.wordpress.com/osd.xml" title="Coding for begginers" />
	<atom:link rel='hub' href='http://codingzero.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Small basic is fun?</title>
		<link>http://codingzero.wordpress.com/2010/06/22/small-basic-is-fun/</link>
		<comments>http://codingzero.wordpress.com/2010/06/22/small-basic-is-fun/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 12:55:32 +0000</pubDate>
		<dc:creator>G.. ..</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://codingzero.wordpress.com/?p=169</guid>
		<description><![CDATA[Microsoft Small Basic has a friendly development environment and  if you are new to programming I think you&#8217;re going to have fun with it.  http://msdn.microsoft.com/en-us/beginner/ff384126.aspx I&#8217;ve made a very simple calculator with SB, here it is:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=169&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Microsoft Small Basic has a friendly development environment and  if you are new to programming I think you&#8217;re going to have fun with it.  <a href="http://msdn.microsoft.com/en-us/beginner/ff384126.aspx">http://msdn.microsoft.com/en-us/beginner/ff384126.aspx</a></p>
<p>I&#8217;ve made a very simple calculator with SB, here it is:</p>
<pre class="brush: java;">

'Simple Calculator in SmallBasic.
begin:

TextWindow.WriteLine(&quot;GM Calculator&quot;)
TextWindow.Write(&quot;&quot;)
TextWindow.WriteLine(&quot;Give your first number: &quot;)
num1 = TextWindow.ReadNumber()

TextWindow.WriteLine(&quot;Give your second number: &quot;)
num2 = TextWindow.ReadNumber()

TextWindow.WriteLine(&quot;What operation would you like to perform: +,-,*,/ &quot;)
perform = TextWindow.Read()

If(perform = &quot;+&quot;) Then
 result = num1 + num2
ElseIf(perform = &quot;-&quot;) Then
 result = num1 - num2
ElseIf(perform = &quot;*&quot;) Then
 result = num1 * num2
ElseIf(perform = &quot;/&quot;) Then
 result = num1 / num2
EndIf

TextWindow.WriteLine(&quot;The result is : &quot; + result)
TextWindow.WriteLine(&quot;Would you like to perfom another operation? (Y)es or (N)o&quot;)
doagain = TextWindow.Read()

If(doagain = &quot;y&quot; Or doagain = &quot;Y&quot;) Then
 Goto begin
EndIf
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codingzero.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codingzero.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codingzero.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codingzero.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codingzero.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codingzero.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codingzero.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codingzero.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codingzero.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codingzero.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codingzero.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codingzero.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codingzero.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codingzero.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=169&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codingzero.wordpress.com/2010/06/22/small-basic-is-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9a663a457df161e06c95941a3197a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">George M. Miltiadous</media:title>
		</media:content>
	</item>
		<item>
		<title>Pain. Or, Why Learning to Code is like Learning Chinese.</title>
		<link>http://codingzero.wordpress.com/2010/02/11/pain-or-why-learning-to-code-is-like-learning-chinese/</link>
		<comments>http://codingzero.wordpress.com/2010/02/11/pain-or-why-learning-to-code-is-like-learning-chinese/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 10:06:21 +0000</pubDate>
		<dc:creator>G.. ..</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://codingzero.wordpress.com/?p=166</guid>
		<description><![CDATA[Great post from Amanda Peyton she describes why it is hard to learn to code, check it out: Pain. Or, Why Learning to Code is like Learning Chinese. http://savemefrombschool.com/2010/02/pain-or-why-learning-to-code-is-like-learning-chinese<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=166&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Great post from Amanda Peyton she describes why it is hard to learn to code, check it out:</p>
<p><strong>Pain. Or, Why Learning to Code is like Learning Chinese.</strong></p>
<p><a href="http://savemefrombschool.com/2010/02/pain-or-why-learning-to-code-is-like-learning-chinese" target="_blank">http://savemefrombschool.com/2010/02/pain-or-why-learning-to-code-is-like-learning-chinese</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codingzero.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codingzero.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codingzero.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codingzero.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codingzero.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codingzero.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codingzero.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codingzero.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codingzero.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codingzero.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codingzero.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codingzero.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codingzero.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codingzero.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=166&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codingzero.wordpress.com/2010/02/11/pain-or-why-learning-to-code-is-like-learning-chinese/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9a663a457df161e06c95941a3197a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">George M. Miltiadous</media:title>
		</media:content>
	</item>
		<item>
		<title>Numbers Game (C++)</title>
		<link>http://codingzero.wordpress.com/2009/12/05/numbers-game-c/</link>
		<comments>http://codingzero.wordpress.com/2009/12/05/numbers-game-c/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 11:54:04 +0000</pubDate>
		<dc:creator>G.. ..</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://codingzero.wordpress.com/?p=122</guid>
		<description><![CDATA[Numbers game:: Give a number, if the number is greater than the defined value it prints out that it is greater if the number is less it prints out its less. You can keep giving numbers until you find the defined value.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=122&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Numbers game::</p>
<p>Give a number, if the number is greater than the defined value it prints out that it is greater if the number is less it prints out its less.</p>
<p>You can keep giving numbers until you find the defined value.</p>
<pre class="brush: cpp;">
#include &lt;iostream&gt;

using namespace std;

int main ()
{

   int counter=0,max = 100;
   long number,input;

   srand(time(0));         // Initialize random generator
   number  = rand()%max;    // Get random between 1 and max

   cout &lt;&lt; &quot;\nInsert a number between 1 and &quot; &lt;&lt; max &lt;&lt; &quot; : &quot;;     do {       cin &gt;&gt; input;
      counter++;                   

         if (number&gt;input) {
           cout &lt;&lt; &quot;Number is greater than &quot; &lt;&lt; input &lt;&lt; &quot;. Try again : &quot;;
           }

        else if (number&lt;&lt; &quot;Number is less than &quot; &lt;&lt; input &lt;&lt; &quot;. Try again : &quot;;
           }

       else {
          cout &lt;&lt; &quot;That's right! Value was &quot; &lt;&lt; input;
          cout &lt;&lt; &quot;\nYou have needed &quot; &lt;&lt; counter &lt;&lt;&quot; attempts.\n&quot;;
           }
     } while (number!=input);

  system(&quot;pause&quot;);
  return 0;

}
</pre>
<p></code></p>
<p><a href="http://codingzero.files.wordpress.com/2009/12/rrtest.jpg"><img class="alignnone size-full wp-image-123" title="RRtest" src="http://codingzero.files.wordpress.com/2009/12/rrtest.jpg?w=655&#038;h=209" alt="" width="655" height="209" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codingzero.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codingzero.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codingzero.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codingzero.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codingzero.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codingzero.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codingzero.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codingzero.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codingzero.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codingzero.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codingzero.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codingzero.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codingzero.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codingzero.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=122&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codingzero.wordpress.com/2009/12/05/numbers-game-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9a663a457df161e06c95941a3197a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">George M. Miltiadous</media:title>
		</media:content>

		<media:content url="http://codingzero.files.wordpress.com/2009/12/rrtest.jpg" medium="image">
			<media:title type="html">RRtest</media:title>
		</media:content>
	</item>
		<item>
		<title>Easy Phonebook (C++)</title>
		<link>http://codingzero.wordpress.com/2009/12/02/easy-phonebook-c/</link>
		<comments>http://codingzero.wordpress.com/2009/12/02/easy-phonebook-c/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 11:57:38 +0000</pubDate>
		<dc:creator>G.. ..</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://codingzero.wordpress.com/?p=110</guid>
		<description><![CDATA[Phonebook:: Adds and give a person&#8217;s name/lastname/mobNumber/id and saves them into a text file named test33.txt and/or search for a person using his ID number.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=110&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Phonebook::<br />
Adds and give a person&#8217;s name/lastname/mobNumber/id and saves them into a text file<br />
named test33.txt and/or search for a person using his ID number.</p>
<pre class="brush: cpp;">
#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
#include &lt;fstream&gt;

using namespace std;

int main()
{

char resp;
int mobnum,test,id;
char firstname[30],lastname[30],email[30];
ofstream foo(&quot;test33.txt&quot;, ios_base::app); //write in file test33, ios_base: //doesn't truncate the file(shorten)

cout &lt;&lt; &quot;Press 1 to add a new person and 2 to search for a person.\n&quot;;
 cin &gt;&gt; test;

if(test == 1)
{

stop:       //the goto stop statement will come back here.
do{

cin.ignore(15, '\n');       //up to 15 characters will be thrown away until a newline character is
//found. am using this for because it doesn't allow you to give a firstname in the do loop.
cout &lt;&lt; &quot;Enter name:\n&quot; ;
cin.getline (firstname,30); //recieves 30 characters for firstname..
cout &lt;&lt; &quot;Enter lastname:\n&quot;;
cin.getline (lastname,30);
cout &lt;&lt; &quot;Enter mobile number:\n&quot;; cin &gt;&gt; mobnum;
cout &lt;&lt; &quot;Enter id number:\n&quot;; cin &gt;&gt; id;
cout &lt;&lt; &quot;Enter email:\n&quot;; cin &gt;&gt; email;

foo &lt;&lt; &quot;\nName: &quot; &lt;&lt; firstname &lt;&lt; &quot; Lastname: &quot; &lt;&lt; lastname; //writes in the file test33
foo &lt;&lt; &quot; Mobile Number: &quot; &lt;&lt; mobnum;
foo &lt;&lt; &quot; Id Number: &quot; &lt;&lt; id;
foo &lt;&lt; &quot; Email: &quot; &lt;&lt; email;

cin.ignore(5, '\n');
cout &lt;&lt; &quot; Add a new person? Press y (yes) or n (no) or (s) to search for a new person: \n&quot;; cin &gt;&gt; resp;
if(resp == 'n'){
break;
}

}while(resp == 'y'); //do loop

}//if(test)
if(test==2||resp=='s')
{

do
{
ifstream verbs(&quot;test33.txt&quot;);
if (verbs) //if it finds the file..
{
string word;
cout &lt;&lt; &quot;Give ID number: &quot; &lt;&lt; endl; cin &gt;&gt; word;
cout &lt;&lt; endl &lt;&lt; &quot;\nID number &quot; &lt;&lt; word &lt;&lt; &quot; is : &quot; &lt;&lt; endl;

string line;
while (getline(verbs, line)) //searches for the word in the word list.. (test33.txt)
{

if (line.find(word) != string::npos)
{

cout &lt;&lt; line &lt;&lt; endl;
}

}//while(geline)

cin.ignore(5, '\n');
cout &lt;&lt; &quot;\nSearch for a new person? Press y (yes) or n (no) or (a) to add for a new person: \n&quot;; cin &gt;&gt; resp;
if(resp == 'a'){
goto stop;
}
if(resp == 'n'){
break;
}

}//if(verbs)
else
{
cout &lt;&lt; &quot;File not found.\n&quot;;
}

}while(resp=='y'); //do loop

}//if(test==2||..)
system(&quot;pause&quot;);
return 0;

}
</pre>
<p><a href="../files/2009/12/yesh1.jpg"><img title="yesh" src="../files/2009/12/yesh1.jpg" alt="" width="632" height="262" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codingzero.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codingzero.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codingzero.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codingzero.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codingzero.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codingzero.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codingzero.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codingzero.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codingzero.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codingzero.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codingzero.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codingzero.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codingzero.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codingzero.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=110&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codingzero.wordpress.com/2009/12/02/easy-phonebook-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9a663a457df161e06c95941a3197a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">George M. Miltiadous</media:title>
		</media:content>

		<media:content url="http://../files/2009/12/yesh1.jpg" medium="image">
			<media:title type="html">yesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Very easy coin flip game (C++)</title>
		<link>http://codingzero.wordpress.com/2009/11/29/very-easy-coin-flip-game-c/</link>
		<comments>http://codingzero.wordpress.com/2009/11/29/very-easy-coin-flip-game-c/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 16:02:51 +0000</pubDate>
		<dc:creator>G.. ..</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://codingzero.wordpress.com/?p=96</guid>
		<description><![CDATA[A game that flips a coin 100 times and outputs hows many times  it landed on heads and how many times it landed on tales.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=96&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A game that flips a coin 100 times and outputs hows many times  it landed on heads and how many times it landed on tales.</p>
<pre class="brush: cpp;">

#include &lt;iostream&gt;

using namespace std;

int main(){
char resp;
int coinheads=0,cointales=0;

do{

for(int i=0; i&lt;100; i++){
int time = rand()%2;
while(time == 0){
cointales++;
break;
}
while(time == 1 ){
coinheads++;
break;
}
}//for loop

cout &lt;&lt; &quot;\nCoin landed on tales &quot; &lt;&lt; cointales &lt;&lt; &quot; times &quot;;
cout &lt;&lt; &quot;\nCoin landed on heads &quot; &lt;&lt; coinheads &lt;&lt; &quot; times \n&quot;;

cointales = 0 , coinheads = 0;

cout &lt;&lt; &quot;\nDo it again? \t (y) Yes or (n) No\n&quot; &lt;&lt; endl;   cin &gt;&gt; resp;

}while(resp == 'y');      //do loop
system(&quot;pause&quot;);
return 0;
} //main
</pre>
<p><a href="http://codingzero.files.wordpress.com/2009/11/coinflipp1.jpg"><img class="alignnone size-full wp-image-100" title="coinflipp" src="http://codingzero.files.wordpress.com/2009/11/coinflipp1.jpg?w=504&#038;h=248" alt="" width="504" height="248" /></a></p>
<p><a href="http://codingzero.files.wordpress.com/2009/11/programmers-life.jpg"><img class="alignnone size-full wp-image-102" title="programmers-life" src="http://codingzero.files.wordpress.com/2009/11/programmers-life.jpg?w=340&#038;h=350" alt="" width="340" height="350" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codingzero.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codingzero.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codingzero.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codingzero.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codingzero.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codingzero.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codingzero.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codingzero.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codingzero.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codingzero.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codingzero.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codingzero.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codingzero.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codingzero.wordpress.com/96/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=96&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codingzero.wordpress.com/2009/11/29/very-easy-coin-flip-game-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9a663a457df161e06c95941a3197a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">George M. Miltiadous</media:title>
		</media:content>

		<media:content url="http://codingzero.files.wordpress.com/2009/11/coinflipp1.jpg" medium="image">
			<media:title type="html">coinflipp</media:title>
		</media:content>

		<media:content url="http://codingzero.files.wordpress.com/2009/11/programmers-life.jpg" medium="image">
			<media:title type="html">programmers-life</media:title>
		</media:content>
	</item>
		<item>
		<title>Header file for Colors for each different line/background (C++)</title>
		<link>http://codingzero.wordpress.com/2009/11/29/header-file-for-colors-for-each-different-linebackground-c/</link>
		<comments>http://codingzero.wordpress.com/2009/11/29/header-file-for-colors-for-each-different-linebackground-c/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 00:52:04 +0000</pubDate>
		<dc:creator>G.. ..</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://codingzero.wordpress.com/?p=89</guid>
		<description><![CDATA[This is a header file so you can use different colors on every line.. and different background..  I found the header file from somewhere else and I thought I should post it.. here&#8217;s a picture of what it does: Header file: file1.h and the code so you can test it.. which I showed you in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=89&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a header file so you can use different colors on every line.. and different background..  I found the header file from somewhere else and I thought I should post it.. here&#8217;s a picture of what it does:<br />
<a href="http://codingzero.files.wordpress.com/2009/11/blogggg.jpg"><img class="alignnone size-full wp-image-90" title="blogggg" src="http://codingzero.files.wordpress.com/2009/11/blogggg.jpg?w=539&#038;h=251" alt="" width="539" height="251" /></a></p>
<p>Header file: file1.h</p>
<pre class="brush: cpp;">
    #ifndef SHORTCOLOURS_H
    #define SHORTCOLOURS_H

    #define FW FOREGROUND_RED | \
               FOREGROUND_GREEN | \
               FOREGROUND_BLUE
    #define FR FOREGROUND_RED
    #define FG FOREGROUND_GREEN
    #define FB FOREGROUND_BLUE
    #define FY FOREGROUND_RED | \
               FOREGROUND_GREEN
    #define FC FOREGROUND_GREEN | \
               FOREGROUND_BLUE
    #define FM FOREGROUND_BLUE | \
               FOREGROUND_RED
    #define FWI FOREGROUND_RED | \
                FOREGROUND_GREEN | \
                FOREGROUND_BLUE | \
                FOREGROUND_INTENSITY
    #define FRI FOREGROUND_RED | \
                FOREGROUND_INTENSITY
    #define FGI FOREGROUND_GREEN | \
                FOREGROUND_INTENSITY
    #define FBI FOREGROUND_BLUE | \
                FOREGROUND_INTENSITY
    #define FYI FOREGROUND_RED | \
                FOREGROUND_GREEN | \
                FOREGROUND_INTENSITY
    #define FCI FOREGROUND_GREEN | \
                FOREGROUND_BLUE | \
                FOREGROUND_INTENSITY
    #define FMI FOREGROUND_BLUE | \
                FOREGROUND_RED | \
                FOREGROUND_INTENSITY
    #define FNULL 0

    #define BW BACKGROUND_RED | \
               BACKGROUND_GREEN | \
               BACKGROUND_BLUE
    #define BR BACKGROUND_RED
    #define BG BACKGROUND_GREEN
    #define BB BACKGROUND_BLUE
    #define BY BACKGROUND_RED | \
               BACKGROUND_GREEN
    #define BC BACKGROUND_GREEN | \
               BACKGROUND_BLUE
    #define BM BACKGROUND_BLUE | \
               BACKGROUND_RED
    #define BWI BACKGROUND_RED | \
                BACKGROUND_GREEN | \
                BACKGROUND_BLUE | \
                BACKGROUND_INTENSITY
    #define BRI BACKGROUND_RED | \
                BACKGROUND_INTENSITY
    #define BGI BACKGROUND_GREEN | \
                BACKGROUND_INTENSITY
    #define BBI BACKGROUND_BLUE | \
                BACKGROUND_INTENSITY
    #define BYI BACKGROUND_RED | \
                BACKGROUND_GREEN | \
                BACKGROUND_INTENSITY
    #define BCI BACKGROUND_GREEN | \
                BACKGROUND_BLUE | \
                BACKGROUND_INTENSITY
    #define BMI BACKGROUND_BLUE | \
                BACKGROUND_RED | \
                BACKGROUND_INTENSITY
    #define BNULL 0

    #endif
</pre>
<p>and the code so you can test it.. which I showed you in the image.. (test.cpp)</p>
<pre class="brush: cpp;">
#include &lt;iostream&gt;
#include &lt;file1.h&gt;

using namespace std;

int main()
{
 cout &lt;&lt; col(RED,true) &lt;&lt; &quot;hi, I'm an intensiv Red \n&quot;;
 cout &lt;&lt; &quot;I'm still red, couz u dont change it!\n&quot;;
 cout &lt;&lt; col(YELLOW|BG_GREEN,true) &lt;&lt; &quot;hi, I'm yellow and my BG is greeen \n&quot;;
 cout &lt;&lt; col(YELLOW,false) &lt;&lt; &quot;now, my color is not intensiv \n&quot;;
 cout &lt;&lt; col(WHITE,false) &lt;&lt; &quot;now I have the standard color.  great.\n&quot;;
 system(&quot;pause&quot;);
 return 0;
}
</pre>
<p><a href="http://codingzero.files.wordpress.com/2009/11/nasoupo.png"><img class="alignnone size-full wp-image-106" title="nasoupo" src="http://codingzero.files.wordpress.com/2009/11/nasoupo.png?w=496&#038;h=326" alt="" width="496" height="326" /></a>&lt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codingzero.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codingzero.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codingzero.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codingzero.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codingzero.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codingzero.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codingzero.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codingzero.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codingzero.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codingzero.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codingzero.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codingzero.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codingzero.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codingzero.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=89&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codingzero.wordpress.com/2009/11/29/header-file-for-colors-for-each-different-linebackground-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9a663a457df161e06c95941a3197a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">George M. Miltiadous</media:title>
		</media:content>

		<media:content url="http://codingzero.files.wordpress.com/2009/11/blogggg.jpg" medium="image">
			<media:title type="html">blogggg</media:title>
		</media:content>

		<media:content url="http://codingzero.files.wordpress.com/2009/11/nasoupo.png" medium="image">
			<media:title type="html">nasoupo</media:title>
		</media:content>
	</item>
		<item>
		<title>Give the characters and get words from dictionary (C++)</title>
		<link>http://codingzero.wordpress.com/2009/11/27/give-the-characters-and-get-words-from-dictionary/</link>
		<comments>http://codingzero.wordpress.com/2009/11/27/give-the-characters-and-get-words-from-dictionary/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 07:41:37 +0000</pubDate>
		<dc:creator>G.. ..</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://codingzero.wordpress.com/?p=80</guid>
		<description><![CDATA[/*George M. Miltiadous Give some characters and get which words include those characters from the English dictionary. You must have examples.txt for this program to run */ Download here: wordlistv1.rar<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=80&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>/*George M. Miltiadous<br />
Give some characters and get which words include those characters from<br />
the English dictionary. You must have examples.txt for this program to run */</p>
<pre class="brush: cpp;">
#include &lt;string&gt;
#include &lt;iostream&gt;
#include &lt;istream&gt;
#include &lt;fstream&gt;

using namespace std;

int main() {

 bool redo = true;
 char resp;

 while(redo){ //while redo = true continue else break..

 ifstream verbs(&quot;example.txt&quot;);
 if (verbs) {
 string word;
 cout &lt;&lt; &quot;Give characters: &quot; &lt;&lt; endl;
 cin &gt;&gt; word;
 cout &lt;&lt; endl &lt;&lt; &quot;\nThe words that contain &quot; &lt;&lt; word &lt;&lt; &quot; are : &quot; &lt;&lt; endl;

 string line;
 while (getline(verbs, line)){
 if (line.find(word) != string::npos) {
 cout &lt;&lt; line &lt;&lt; endl;            }//if(line..)

 }//while(getline)
 }//if(verbs)
 else{ cout &lt;&lt; &quot;File not found.\n&quot;; break;}

 cout &lt;&lt; &quot;\nGive another character? (y/n)&quot; &lt;&lt; endl;
 cin &gt;&gt; resp;
 redo = (resp == 'y') ? true : false;

 }//while(redo)

 system(&quot;pause&quot;);
 return 0;
 }
</pre>
</pre>
<p><a href="http://codingzero.files.wordpress.com/2009/11/realwow.jpg"><img class="alignnone size-full wp-image-81" title="realWOW" src="http://codingzero.files.wordpress.com/2009/11/realwow.jpg?w=569&#038;h=338" alt="" width="569" height="338" /></a><br />
<span style="font-size:medium;"> </span></p>
<p>Download here:<br />
<a href="http://cpptutorials.freeforums.org/download/file.php?id=14">wordlistv1.rar</a></p>
<p><span style="font-size:medium;"> </span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codingzero.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codingzero.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codingzero.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codingzero.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codingzero.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codingzero.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codingzero.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codingzero.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codingzero.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codingzero.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codingzero.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codingzero.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codingzero.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codingzero.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=80&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codingzero.wordpress.com/2009/11/27/give-the-characters-and-get-words-from-dictionary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9a663a457df161e06c95941a3197a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">George M. Miltiadous</media:title>
		</media:content>

		<media:content url="http://codingzero.files.wordpress.com/2009/11/realwow.jpg" medium="image">
			<media:title type="html">realWOW</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Hello World&#8221; in C++</title>
		<link>http://codingzero.wordpress.com/2009/11/26/hello-world-in-c/</link>
		<comments>http://codingzero.wordpress.com/2009/11/26/hello-world-in-c/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 12:10:59 +0000</pubDate>
		<dc:creator>G.. ..</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://codingzero.wordpress.com/?p=60</guid>
		<description><![CDATA[This is a &#8220;hello word&#8221; program in c++ first thing you should remember about c++ is to use the #include&#8217;s if you dont use them most likely your program won&#8217;t compile.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=60&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a &#8220;hello word&#8221; program in c++ first thing you should remember about c++ is to use the #include&#8217;s if you dont use them most likely your program won&#8217;t compile.</p>
<pre class="brush: cpp;">

#include&lt;iostream&gt; //Specifies one or more header files to be included in the generated same as import in Java
using namespace std; //namespaces allows us to group a set of global classes, objects and/or functions under a name.

int main(){ //prototype of the main function returns void

cout &lt;&lt; &quot;Hello World&quot; &lt;&lt; endl; //prints out &quot;Hello World&quot; and gives us a new line (endl)

return 0; //indicates successful completion of a program

}//end of main function
</pre>
<pre><a href="http://codingzero.files.wordpress.com/2009/11/testttt1.jpg"><img class="alignnone size-full wp-image-77" title="testttt" src="http://codingzero.files.wordpress.com/2009/11/testttt1.jpg?w=664&#038;h=153" alt="" width="664" height="153" /></a>

<a href="http://codingzero.files.wordpress.com/2009/07/realprogrammers.jpg"><img title="RealProgrammers" src="http://codingzero.files.wordpress.com/2009/07/realprogrammers.jpg?w=248&#038;h=273" alt="" width="248" height="273" /></a></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codingzero.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codingzero.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codingzero.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codingzero.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codingzero.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codingzero.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codingzero.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codingzero.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codingzero.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codingzero.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codingzero.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codingzero.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codingzero.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codingzero.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=60&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codingzero.wordpress.com/2009/11/26/hello-world-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9a663a457df161e06c95941a3197a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">George M. Miltiadous</media:title>
		</media:content>

		<media:content url="http://codingzero.files.wordpress.com/2009/11/testttt1.jpg" medium="image">
			<media:title type="html">testttt</media:title>
		</media:content>

		<media:content url="http://codingzero.files.wordpress.com/2009/07/realprogrammers.jpg" medium="image">
			<media:title type="html">RealProgrammers</media:title>
		</media:content>
	</item>
		<item>
		<title>Third Lesson (Receives a character from the keyboard)</title>
		<link>http://codingzero.wordpress.com/2009/07/24/third-lesson-receives-a-character-from-the-keyboard/</link>
		<comments>http://codingzero.wordpress.com/2009/07/24/third-lesson-receives-a-character-from-the-keyboard/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 23:13:52 +0000</pubDate>
		<dc:creator>G.. ..</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://codingzero.wordpress.com/?p=32</guid>
		<description><![CDATA[This program reads characters from the keyboard until we enter (#), afterwards it prints on the screen how many letters the user have entered, and how many of the letters are the same.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=32&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This program reads characters from the keyboard until we enter (#), afterwards it prints on the screen how many letters the user have entered, and how many of the letters are the same.</p>
<pre class="brush: java;">

import java.io.*;  // imports java.io.* package in your program so that you can use IO(Input/Output) class — to read/write a file
// for this program we use it for (char)System.in.read(); which reads a charackter from the keyboard

public class characterprogram
{
public static void main(String args[]) throws IOException
{ /*you have to always put throws IOException after the public static void main(String args[])  because
most methods of this IO class throw an exception if anything goes wrong, therefore you have to put
block of the code that call this method inside a try-catch block. For this program we dont use the try-catch block*/

int letters=0,sameletters=0; //initializes integer variable letters, sameletters and makes them zero.
char ch1=’ ‘; //initializes character ch1 so we can read a character from the keyboard
char ch2; //we make a ch2 character so we can save the previous letter
ch1=(char)System.in.read(); //reads a character from the keyboard and saves it into ch1.
if ((ch1&gt;=’A'&amp;&amp;ch1&lt;=’Z')||(ch1&gt;=’a'&amp;&amp;ch1&lt;=’z')) //checks if it is a letter with an if statement
{

letters++; //if it is a letter then adds up to a number to letters variable
}
ch2=ch1; //saves ch1 into ch2

while(ch1!=’#') //this is a while loop, while ch1 is not equal with #
{
ch1=(char)System.in.read(); //read the next character

if ((ch1&gt;=’A'&amp;&amp;ch1&lt;=’Z')||(ch1&gt;=’a'&amp;&amp;ch1&lt;=’z'))//if statement, if it is a letter then..
{

letters++; //if it a letter then add up to a number to sameletters variable

if(ch2==ch1) //check if ch2 is equal with ch1
{
sameletters++; //if it the same(ch2==ch1) then add up to a number to sameletters variable
}
}
ch2=ch1; //saves ch1 into ch2

}
System.out.println(“The number of letters are: ” + letters); //prints on the screen the number of letters
System.out.println(“The number of same letters are: ” +sameletters); //prints on the screen the number of same letters.

}//main
}//class
</pre>
<p><img class="alignnone size-medium wp-image-33" title="java-evil-edition" src="http://codingzero.files.wordpress.com/2009/07/java-evil-edition.png?w=186&#038;h=300" alt="java-evil-edition" width="186" height="300" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codingzero.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codingzero.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codingzero.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codingzero.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codingzero.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codingzero.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codingzero.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codingzero.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codingzero.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codingzero.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codingzero.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codingzero.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codingzero.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codingzero.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=32&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codingzero.wordpress.com/2009/07/24/third-lesson-receives-a-character-from-the-keyboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9a663a457df161e06c95941a3197a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">George M. Miltiadous</media:title>
		</media:content>

		<media:content url="http://codingzero.files.wordpress.com/2009/07/java-evil-edition.png?w=186" medium="image">
			<media:title type="html">java-evil-edition</media:title>
		</media:content>
	</item>
		<item>
		<title>Second java lesson. (Receives a number from the keyboard)</title>
		<link>http://codingzero.wordpress.com/2009/07/24/second-java-lesson-receive-a-number-through-the-keyboard/</link>
		<comments>http://codingzero.wordpress.com/2009/07/24/second-java-lesson-receive-a-number-through-the-keyboard/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 17:48:57 +0000</pubDate>
		<dc:creator>G.. ..</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://codingzero.wordpress.com/?p=18</guid>
		<description><![CDATA[This program receives a number from the keyboard entered by the user which is scottish pounds currency and converts it into united states dollars and prints it on the screen. ( 1 Scottish pound = 1 dollar 37 cent )<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=18&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>This program receives a number from the keyboard entered by the user which is scottish pounds currency and<br />
converts it into united states dollars and prints it on the screen. ( 1 Scottish pound = 1 dollar 37 cent )</em></p>
<pre class="brush: java;">

public class bank {

public static void main(String args[]) {

int pounds, cents, dollars, cents1; //pounds, cents, dollars, cents1 are integer(int) variables
pounds=Integer.parseInt(args[0]); /*Integer is a name of a class in java.lang package and parseInt() is a
method which accepts and integer from the keyboard and saves it to integer pounds.*/

//now we will try to convert the number we've got from the keyboard(Scottish pounds) into dollars:

cents=pounds*137; //multiplies pounds with 137 and saves it to cents.
dollars=cents/100; //divides cents with 100 and saves it to dollars.
cents1=cents%100; //modules cents with 100 and saves it to cents1

//and finally we print our convertion with System.out.println
System.out.println(pounds+&quot; scottish pounds are: &quot;+ dollars+&quot;$   and  &quot;+ cents1+&quot; cents&quot;);

}
}
</pre>
<p><em><br />
</em></p>
<p><strong><img class="alignnone size-medium wp-image-22" title="545fae933d" src="http://codingzero.files.wordpress.com/2009/07/545fae933d.jpg?w=236&#038;h=300" alt="545fae933d" width="236" height="300" /><br />
</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codingzero.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codingzero.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codingzero.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codingzero.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codingzero.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codingzero.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codingzero.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codingzero.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codingzero.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codingzero.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codingzero.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codingzero.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codingzero.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codingzero.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codingzero.wordpress.com&amp;blog=8715296&amp;post=18&amp;subd=codingzero&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codingzero.wordpress.com/2009/07/24/second-java-lesson-receive-a-number-through-the-keyboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9a663a457df161e06c95941a3197a50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">George M. Miltiadous</media:title>
		</media:content>

		<media:content url="http://codingzero.files.wordpress.com/2009/07/545fae933d.jpg?w=236" medium="image">
			<media:title type="html">545fae933d</media:title>
		</media:content>
	</item>
	</channel>
</rss>
