Code:using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Number_Game { class Program { static void Main(string[] args) { String Frst,Second,Guess; int First,Secnd,gyuss,outtie; Random rndi = new Random(); Console.WriteLine("welcome to the number guessing game."); Frst = Console.ReadLine(); Second = Console.ReadLine(); Secnd = int.Parse(Second); First = int.Parse(Frst); outtie = rndi.Next(First, Secnd); Console.WriteLine("Please guess a number : "); Guess = Console.ReadLine(); gyuss = int.Parse(Guess); if (outtie == gyuss) { Console.WriteLine("You win! ;D"); Console.ReadKey(); } else { Console.WriteLine("Fail"); Console.ReadKey(); } } } }
Results 1 to 6 of 6
- 05 Jul. 2010 12:19am #1
[C#] Number game (My little brother coded it)
Shh, I'm watching My little pony.
- 07 Jul. 2010 07:20pm #2
Java? Gross. Good structure though.
- 07 Jul. 2010 09:55pm #3
Its C# xD
thats what it says in the title, and thats what it isShh, I'm watching My little pony.
- 07 Jul. 2010 10:23pm #4
I know its C#. But if you ever programmed in Java, you know that the two are extremely similar. I happen to hate Java with a passion. So anything that resembles it is automatically gross in my book.
- 08 Jul. 2010 01:31am #5
- 08 Jul. 2010 04:38am #6
Maybe not all as much as Java. But I never liked web coding that much. So don't take my blind ignorant hate personal.