Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. int tablica[50];
  2.     int tablica1[50];
  3.  
  4.     srand(time(NULL));
  5.  
  6.     for(int i = 0; i<50; i++){
  7.         tablica[i] = rand()%11+10;
  8.         tablica1[i] = rand()%5+1;
  9.         cout << tablica[i] << endl;
  10.     }
  11.  
  12.     cout << "" << endl;
  13.  
  14.     for(int i=0; i<50; i++){
  15.         cout << tablica1[i] << endl;
  16.     }
  17.  
  18.     int xx = 0;
  19.     int yy = 0;
  20.     int wynik1 = 1;
  21.  
  22.     for(int i=0; i<50; i++){
  23.         xx=tablica[i];
  24.         yy=tablica1[i];
  25.         wynik1 = 1;
  26.         for(int j=0; j<yy; j++){
  27.             wynik1 = wynik1 * xx;
  28.         }
  29.         cout << xx << " do " << yy << " = " << wynik1 << endl;
  30.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement