Have to write a function return a square of number from 50 to 100, without using a seed and take no parameters.
I know how to generate a random number in a fixed range (for example 0 to 99):
int n;
n=rand(100); /* n is random number in range of 0 - 99 */
EDIT:
By the way, I used rand() and every time I run it give me same result. I know it because of my compiler, is there anyways to change it (remember not using a seed)
Any idea is much appreciated!
EDIT 2: OK I figured out how to fulfill all requirement. Thank you all!
Massimiliano is the first one who give me correct IDEA how to do it.
This is definitely more of a math question than a programming question, but the answer is in the question: