Advertisement
Guest User

weew

a guest
Dec 20th, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream.h>
  2. #include <conio.h>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6.  
  7. int main(){
  8. int m,n,i,j,summ,arr[2][2];
  9. srand(time(NULL));
  10.  
  11. for (i=0;i<2;i++){
  12.     for (j=0;j<2;j++){
  13.         for (i=0;i<2;i++){
  14.     m = rand() % 10 + 1;
  15.     n = rand() % 10 + 1;
  16.     }
  17.      arr[i][j] = arr[m][n];
  18.      }
  19.      }
  20. for (i=0;i<2;i++){
  21.     for (j=0;j<2;j++){
  22.         cout << "[" << arr[i][j] << "]";
  23.         }
  24. }
  25. system("pause");
  26. return(0);  
  27.    
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement