Advertisement
bal_gennady

random array

Jan 8th, 2019
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <time.h>
  2.  
  3. srand( time(0u) );                  //для случайности
  4. const int N = 15;
  5. int arr[N] = {};
  6. for ( unsigned i=0; i<N; i++ ) {
  7.     arr[i] = rand() % 10;           //Заполнение 0..9
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement