pan7nikt

losowanie

Jan 28th, 2020
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <time.h>
  4. using namespace std;
  5.  
  6. int tab[5];
  7. int i = 0;
  8. int ID;
  9. int a = 1;
  10.  
  11. main()
  12. {
  13.     srand(time(NULL));
  14.    
  15.     while(i<5)
  16.     {
  17.         tab[i] = rand()%30 + 1;
  18.         cout << tab[i] << "." << endl;
  19.         for(a=0;a<=5;a++)
  20.         {
  21.            
  22.         }
  23.    
  24.    
  25.     }
  26.     cout << "================" << endl;
  27.    
  28.     a = 0;
  29.    
  30.     for(i=0; i<5; i++)
  31.     {
  32.         cout << tab[i] << "." << endl;
  33.     }
  34. }
Add Comment
Please, Sign In to add comment