Advertisement
Guest User

POPULACJA

a guest
Mar 30th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. using namespace std;
  2.  
  3.  
  4. #include <iostream>
  5.  
  6.  
  7. int pop[80];
  8.  
  9.  
  10. void wys()
  11. {
  12.     for (int i = 0; i < 80; i++)
  13.     {
  14.        
  15.         if (i % 10 == 0)
  16.         {
  17.             cout << endl;
  18.         }
  19.         cout << pop[i] << " ";
  20.        
  21.     }
  22. }
  23.  
  24. int main()
  25. {
  26.    
  27.    
  28.    
  29.     for (int i = 0; i < 80; i++)
  30.     {
  31.         if (i % 4 == 0)
  32.         {
  33.             pop[i] = 2;
  34.         }
  35.         else
  36.         {
  37.             pop[i] = 1;
  38.         }
  39.  
  40.        
  41.     }
  42.  
  43.    
  44.    
  45.     wys();
  46.    
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement