Advertisement
Purianite

Untitled

Sep 23rd, 2011
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <time.h>
  3.  
  4. using namespace std;
  5.  
  6. int main(int argc, char* argv[])
  7. {
  8. bool grid[8][8] = {0};
  9. int bossx, bossy;
  10.  
  11. srand (time(NULL));
  12. bossx = rand() % 8;
  13. bossy = rand() % 8;
  14. grid[bossx][bossy] = 1;
  15. for (int i = 0; i < 8; ++i)
  16. {
  17. for (int j = 0; j < 8; ++j)
  18. {
  19. if(grid[i][j]) cout << "Boss found at " << i << ", " << j << "\n";
  20. }
  21. }
  22.  
  23. cin.get();
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement