rand: generates a sequence of pseudorandom numbers : rand « stdlib.h « C / ANSI-C






rand: generates a sequence of pseudorandom numbers


    

//Declaration: int rand(void); 

  #include <stdlib.h>
  #include <stdio.h>

  int main(void)
  {
    int i;

    for(i=0; i<10; i++){
      printf("%d \n", rand());
    }

    return 0;
  }

         
/*
262236772
208042609
800207362
428428949
47718728
1793958355
1543227091
1255063701
1245922717
448084510
*/ 

           
       








Related examples in the same category