daily pastebin goal
92%
SHARE
TWEET

aleatorio.c

alduncin Jul 1st, 2013 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //de 0 a 1, muestra de 100 numeros
  2. #include <stdlib.h>
  3. #include <time.h>
  4. int main(int argc, char** argv[])
  5. {
  6.   float numero=0;
  7.   int N=100,i;//100
  8.   //  N=(int)argv[1];
  9.   srand (time (NULL));
  10.   for(i=0;i<N;i++){
  11.   numero =  ((0-1)*((float)rand()/RAND_MAX))+1;
  12.   printf(" %f \n",numero);
  13.   }
  14. }
RAW Paste Data
Top