fork download
  1. // Example program
  2. #include <iostream>
  3. #include <string>
  4. #include <cstdlib>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. int high = 7;
  11. int low = 2;
  12.  
  13. int numbers = 10;
  14. int arr[10];
  15. int arr2[10];
  16.  
  17. for (int i=0;i<numbers;i++)
  18. {
  19. arr[i]=rand()%(high+1-low)+low;;
  20. cout << arr[i] << " ";
  21. arr2[i]= arr[i];
  22. cout << arr2[i] << " ";
  23. }
  24.  
  25.  
  26. }
  27.  
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
3 3 6 6 5 5 3 3 7 7 3 3 6 6 2 2 5 5 3 3