Click here to Skip to main content
15,037,009 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
i need a C code to generate random numbers without using built in random functions.
random numbers can be generated in between 1 to 10.
Posted
Updated 25-Mar-14 4:31am
v2
Comments
Christian Amado 25-Mar-14 10:52am
   
Hi vjnan, Why reinvent the wheel? In C you have a built in function.
vjnan 25-Mar-14 11:26am
   
In an interview i was asked to answer this question....
Sergey Alexandrovich Kryukov 25-Mar-14 11:58am
   
If you want to learn all what you have been asked on some interview to prepare to next interview, you are probably wasting your time. But I would understand if you are doing it out of curiosity. By the way, for an interview question, this one was quote stupid. There is no point of asking such things.
—SA

1 solution

Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...

A very quick search gave 13 million hits: random number algorithm[^]

In future, please try to do at least basic research yourself, and not waste your time or ours.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900