You are here:

C/No Repeated Random Numbers

Advertisement


Question
Dear Sir,
I want to create a program in C, which generates random numbers, but each number should be unique than each other (no repeated random numbers). I've to complete my game assignment in C. Can you please make it for me? I really need it.  Without this , I can't complete my project. The game name is Sokudo. I don't want its coding. I just want a code, which generates a different random numbers every time.
Please!!!

See ya!!
From Akram
Thankx in advance

Answer
Hi Akram

For solving this problem you need to create an array where the generated number will be stored and whenever the function generates a same number that is already present in the array the same function will be called again to generate unique numbers that are not present in the array.

For reference to your project you can try having a look at this website http://www.scodz.com this might help you to create your project.

For any further assistance please feel free to get back to me

regards
Joydeep Bhattacharya
http://www.scodz.com

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Joydeep Bhattacharya

Expertise

Ability to solve C and Data Structure problems and puzzles with simple and easy to understand logic.

Experience

C, C++, Java, Data Structure, PHP, Web Designing

Organizations
http://www.scodz.com Designation: webmaster

Publications
http://www.scodz.com

Education/Credentials
Master of Computer Applications

Past/Present Clients
http://analysingc.50webs.com http://www.funforu.com

©2012 About.com, a part of The New York Times Company. All rights reserved.