Tuesday, July 7, 2009

Guess the number

Here's something I made. Inspired by the classic game, pick a number. It's really simple and took me...10 minutes? 70 lines of code.

Made it in C++ and it's run on the command prompt (or whatever console window you have)

here's the link for download

http://www.filehosting.org/file/details/44477/Number_Guess_Final.exe

There's no viruses in there because first of all it's only 465k...too small to hold anything. Also, the site gives a virus scan so people can't upload mal-ware onto there. However, there are couple of errors and bugs that I didn't bother ironing out. Do not input letters at any stage of the program. It will cause a infinite loop and you'll have to close command prompt to get rid of it.

Although it's about as fun as watching a snail crawl, it works. That's the most important.The hardest thing on there was probably the random number generator. That was kinda tricky to implement.

Anyway, have fun...

Michael You

2 comments:

  1. nicely done. bugs crashed my comp once though xD

    ReplyDelete
  2. lol yeh. infinite loops are evil. I didn't find out until my bro was screwing around and typed in letters. by then i was too lazy to change it lol

    ReplyDelete