C# Guessing Program

Guessing Number Program

Page 1 of 1

5 Replies - 700 Views - Last Post: 19 October 2009 - 01:59 PM Rate Topic: -----

#1 Perez  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 16-October 09

C# Guessing Program

Posted 16 October 2009 - 11:19 PM

I want help solving this number guessing program. This is the first time I've tried solving this and want to get it done if you know how to solve it please help me. Because this is all I have so far I'm working on Visual Studios in C#.

string x;

x = (textBox1.Text);

This post has been edited by Perez: 16 October 2009 - 11:21 PM

Is This A Good Question/Topic? 0
  • +

Replies To: C# Guessing Program

#2 MentalFloss  Icon User is offline

  • Not really an expert anymore...
  • member icon

Reputation: 433
  • View blog
  • Posts: 1,157
  • Joined: 02-September 09

Re: C# Guessing Program

Posted 17 October 2009 - 12:36 AM

We need some kind of elaboration of your actual problem.
Is it a hi-lo game where the guess prompts a new request for a guess and states Too high or too low?
Is it a one shot deal?

You have to explain what you're doing.
Was This Post Helpful? 0
  • +
  • -

#3 Fuingurth  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 11
  • View blog
  • Posts: 118
  • Joined: 13-August 09

Re: C# Guessing Program

Posted 17 October 2009 - 01:04 PM

View PostPerez, on 16 Oct, 2009 - 10:19 PM, said:

string x;

x = (textBox1.Text);


Use code tags next time plz they look like this [ code] [ /code].
um, yeah a bit more elaboration, but i am assuming you are using windows forms, yes? If so you will either need a label, or a messagebox to tell whether the guess was right or wrong, higher, lower, or whatever else. Prolly will need to check string x against something else. like this
if(x=10)
	{
		label1.text="CORRECT!";
	}
else
   {
	   label1.text="please try again."
	}


Was This Post Helpful? 0
  • +
  • -

#4 orangeinternet  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 14-June 09

Re: C# Guessing Program

Posted 18 October 2009 - 01:53 PM

You could try something like this: (Note: i wont do your homework, so this isnt code)

It picks a random number, and you input your guess, it counts the guesses, and will tell you higher or lower... if you have questions email me @ hacking.cow@hotmail.com
Was This Post Helpful? 0
  • +
  • -

#5 Fuingurth  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 11
  • View blog
  • Posts: 118
  • Joined: 13-August 09

Re: C# Guessing Program

Posted 19 October 2009 - 01:24 PM

Check this tutorial on the site
http://www.dreaminco...wtopic76122.htm
Was This Post Helpful? 0
  • +
  • -

#6 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1511
  • View blog
  • Posts: 5,916
  • Joined: 21-March 08

Re: C# Guessing Program

Posted 19 October 2009 - 01:59 PM

I thought this was kinda funny. The rules state to post the code you have or we won't answer. So he posts probably the two most basic lines of code that probably have nothing to do with the project.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1