ok i need help with this. i didnt know where to post it so here it goes
ok im trying to make a game. well it's a project for school. here is what i have to do .
Write an application that plays "guess the number" as follows: Your application chooses the number to be guessed by selecting a random integer in the range 1 to 1000. The application displays the promp Guess a number between 1 and 1000. The player inputs a first guess. If the player's guess is incorrect, your application should display Too high. Try Again. or Too low. Try again. to help the player "zero in" on the correct answer. The application should prompt the user for the next guess. When the user enters the correct answer, display Congratulation s. You guessed the number! and allow the user to choose wether to play again.
here is what i have so far, not much but hey, so if anyone can help i would really appreciate it.
using System;
public class GuessingGame
{
public static void Main (string[]args)
{
Random randomNumber = new Random();
int mainNumber;
for (int counter = 1; counter <=1; counter++)
{
mainNumber = randomNumber.N ext(1,1001);
}
Console.WriteL ine("Number is set, Guess a number between 1 and 1000");
int guess = Convert.ToInt3 2(Console.ReadLi ne()); //read guessed number
EDIT: oh yeah this is a console application.