<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Need help creating random number guessing game' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Need help creating random number guessing game' posted on the 'Assembler Developer' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 13:24:25 -0700</pubDate>
    <lastBuildDate>Sat, 25 May 2013 13:24:25 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Need help creating random number guessing game</title>
      <link>http://www.programmersheaven.com/mb/pharabee/428296/428296/need-help-creating-random-number-guessing-game/</link>
      <description>Visual Basic provides a function that can generate random numbers.  This function, Rnd, will return a random number, of type Single, between 0 and 1.  To get truly random numbers, you must initialize the random number generator using the Randomize statement.  Place this statement in the Form Load event.  &lt;br /&gt;
&lt;br /&gt;
Create a program that will “think” of a number between 1 and 10.  In a Do While loop, use the InputBox function to ask the user to guess the number.  Keep track of how many tries it takes the user to guess the number.&lt;br /&gt;
&lt;br /&gt;
Tell the user how many tries it took him to guess the number.  Use Select Case to display an appropriate message, based on the number of tries (see below).   You may use a label on the form or MsgBox for the output.  &lt;br /&gt;
&lt;br /&gt;
To create a random number between 1 and 10, multiply the result of Rnd by 10 and add 1.  Rnd * 10 + 1&lt;br /&gt;
Use the Int function to convert the result of Rnd to an integer.&lt;br /&gt;
&lt;br /&gt;
Here’s help (use Option Explicit, Val function, appropriate data types and standard prefixes):&lt;br /&gt;
&lt;br /&gt;
Private Sub cmdStart_click( )&lt;br /&gt;
&lt;br /&gt;
‘Declare RandomNumber variable&lt;br /&gt;
&lt;br /&gt;
‘Declare InputNumber variable&lt;br /&gt;
&lt;br /&gt;
‘Declare Counter variable&lt;br /&gt;
&lt;br /&gt;
‘Create random number between 1 and 10&lt;br /&gt;
RandomNumber = Int(Rnd * 10 + 1)&lt;br /&gt;
&lt;br /&gt;
‘Use this line of code during testing, then remove it!&lt;br /&gt;
Print RandomNumber&lt;br /&gt;
&lt;br /&gt;
‘Get numeric value of user’s guess and accumulate number of guesses until there’s a match&lt;br /&gt;
Do While InputNumber &amp;lt;&amp;gt; RandomNumber&lt;br /&gt;
	     InputNumber =  Val(InputBox (“Guess my number between 1 and 10”,”Guessing Game”))&lt;br /&gt;
	     Counter = Counter + 1&lt;br /&gt;
Loop &lt;br /&gt;
&lt;br /&gt;
‘Display output&lt;br /&gt;
Select Case Counter&lt;br /&gt;
	Case 1 &lt;br /&gt;
		MsgBox (“Wow!  You guessed my number in 1 try!”)&lt;br /&gt;
	Case 2 to 3&lt;br /&gt;
		MsgBox (“Great job!  You guessed my number in “ &amp;amp; Counter &amp;amp; “ tries!”)&lt;br /&gt;
		Case 4 to 5&lt;br /&gt;
			.&lt;br /&gt;
			.&lt;br /&gt;
			.&lt;br /&gt;
	End Select&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Every time that I press the start button to begin guessing numbers, the answer is revealed on the side. How do I stop this? &lt;/strong&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pharabee/428296/428296/need-help-creating-random-number-guessing-game/</guid>
      <pubDate>Sun, 15 Apr 2012 16:27:03 -0700</pubDate>
      <category>Assembler Developer</category>
    </item>
    <item>
      <title>Re: Need help creating random number guessing game</title>
      <link>http://www.programmersheaven.com/mb/pharabee/428296/428335/re-need-help-creating-random-number-guessing-game/#428335</link>
      <description>&lt;br /&gt;
&lt;br /&gt;
TERA , also known as The Exiled Realm of Arborea is a MMORPG currently in development by Bluehole Studio. It was released in South Korea on January 25, 2011 and is set to release in North America and Europe in mid 2011. It is said that the game has typical online RPG features such as quests, crafting and player versus player.And now, we have a large amount of [url=http://www.cheapteragold.us]tera gold[/url] in stock! In addition, we can provide the professional [url=http://www.usteragold.com]power leveling[/url] for players who do not have enough time to make it update.Our [url=http://www.ustera.com/buy-tera-gold/]power leveling[/url] can help you update to a high level in a short time which will not effect your regular work!We can promise you that our transations are very reliable and quickly,and the price of our [url=http://www.usteragold.com]tera gold[/url] is the cheapest! Your satisfactory is our lifeline.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pharabee/428296/428335/re-need-help-creating-random-number-guessing-game/#428335</guid>
      <pubDate>Tue, 17 Apr 2012 23:56:48 -0700</pubDate>
      <category>Assembler Developer</category>
    </item>
  </channel>
</rss>