Advertisement
RedReaper132

SGDJ #1

Jul 11th, 2011
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <ctime>
  4. #include <cstdlib>
  5. using namespace std;
  6.  
  7. int main( int argc, char* args[] )
  8. {
  9.   srand(time(NULL));
  10.  
  11.   const int N = 12;
  12.  
  13.   string izb[] = { "Mashup", "Dan, ko sem se naucil carati", "Top-down", "Mini RTS", "Vrtnarjenje", "Prosto grajenje oz. razvoj", "Post apocalyptic", "Random generated content", "RPG brez nasilja", "Simulation", "Photo realistic", "SHMUP" };
  14.  
  15.   int num[2];
  16.  
  17.   num[0] = rand() % N;
  18.  
  19.   do
  20.     {
  21.       num[1] = rand() % N;
  22.     }while (num[1] == num[0]);
  23.  
  24.   cout << "SGDJ #1 Teme:\n" << izb[num[0]] << endl << izb[num[1]] << endl;
  25.   cin.get();
  26.  
  27.   return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement