kburnik

C++ Zadatak Bingo

Oct 13th, 2012
116
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  
  3. C++ radionica
  4.  
  5. Zadatak: Bingo
  6.  
  7. Autor zadatka: Kristijan Burnik
  8.  
  9. Autor rjesenja: Kristijan Burnik
  10.  
  11. Datum rjesavanja: 2012-10-13
  12.  
  13. */
  14. #include <iostream>
  15. #include <cstdlib>
  16.  
  17.  
  18. using namespace std;
  19.  
  20. int main() {
  21.  
  22.     int n,k;
  23.    
  24.     cin >> n >> k;  
  25.    
  26.     string igrac[n];
  27.     for (int i = 0 ; i < n; i++)
  28.         cin >> igrac[i];
  29.      
  30.     string listic[k];
  31.     for (int i = 0 ; i < k; i++)
  32.         cin >> listic[i];
  33.  
  34.  
  35.     for (int i = 0 ; i < n; i++) {
  36.         cout << igrac[i] << ": ";
  37.         for (int j = i; j < k; j += n) {
  38.             cout << listic[j] << " ";
  39.         }
  40.         cout << endl;
  41.     }
  42.  
  43.  
  44.     system("pause");
  45.  
  46.     return 0;
  47. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×