Advertisement
Guest User

Untitled

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