/*************************************************************************** This program creates a randomized array of initial velocities of either -1 or 1, with N/2 of each. I choose N/2 sites randomly. Sites in this list are given velocity +1, the others -1. Original version by Deva O'Neil. Modified by Peter Young. **************************************************************************/ #include #include #include #include void random_vs (int N, double v[]) { int k, num; double sum; int taken[N] ; // shows whether a given number is already taken srand(time(NULL)); // Seed the random number generator for(k=0; k