SHARE
TWEET

Untitled

a guest Jan 15th, 2020 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. int A[3][3];
  5. void print()
  6. {
  7.     for(int i = 0; i < 3; i ++)
  8.         {for (int j = 0; j < 3; j ++)
  9.         if (A[i][j] == 0) cout<<" -";
  10.         else if (A[i][j] == 1) cout<<" X";
  11.         cout<<endl;
  12.         }
  13. }
  14.  
  15. int main()
  16. {
  17.     for (int i = 0; i < 3; i++)
  18.         for (int j = 0; j < 3; j++)
  19.         A[i][j] = 0;
  20.  
  21. cout<<"Vvedite hod";
  22. int i, j;
  23. cin>>i>>j;
  24. A[i-1][j-1] = 1;
  25. print();
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top