314ma

Henryk

Oct 21st, 2020 (edited)
91
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int tab[10];
  9.     for(int i = 0; i < 10; i++) {
  10.         tab[i] = rand() % 21 - 10;
  11.     }
  12.     for(int i = 0; i < 10; i++) {
  13.         cout << "TAB[" << i << "] = " << tab[i] << "\n";
  14.     }
  15.     return 0;
  16. }
  17.  
  18. /////////////////////////////////////////////////////////////////
  19. #include <iostream>
  20. #include <cstdlib>
  21.  
  22. using namespace std;
  23.  
  24. int main()
  25. {
  26.     int tab[10];
  27.     for(int i = 0; i < 10; i++) {
  28.         tab[i] = rand() % 21 - 10;
  29.         cout << "TAB[" << i << "] = " << tab[i] << "\n";
  30.     }
  31.     return 0;
  32. }
  33.  
RAW Paste Data