Allright, So in continues to some replies that have been I see I eventually need to open a new thread.
I already read the topic about the rand() in the FAQ and couldn't get the answer I was looking for. I also didn't get the answer in the replies I got. Although I got great answers that did the job when you don't use scanf. When I tried applying it into the program I want to create - it did not work well.
I'm trying to create a program that will run several weight categories.
Each category needs to have its own weight approximations. (between 'x' to 'y')
Lets say we have only 2 categories. In each category there are 3 men and 3 women.
In category A, the approximated weight is between 50-80.
In category B, the approximated weight is between 81-100.
The user will need to enter one of the categories and choose 1 men and 1 woman.
Before he chooses he will see their weight. (Their weight needs to be random, within the category randomized limits that were set earlier)
Now after the user have chosen, lets say he needs to choose again from the same category...
I want to make sure that the other 4 people that remained in that category he entered earlier, won't necessary have the same weight again, but different weights - within the category randomized limits that were set earlier. So when next time he enters that category - it will not be exactly the same. it doesn't need to be completely different, after all we're talking about random here, but it does need to be abit different.
I think my main problem is to create a loop that will randomize the people weights within the category.
I just want to say thanks to dwks & iMalc who did help me understanding the rand() process, I guess I should have explained myself better from the start.
Hope somebody could help me with this one.