SHARE
TWEET

Poop

a guest Dec 6th, 2019 111 in 126 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  int chess[8][8];
  8.   char el;
  9.   int zam;
  10.   int col
  11. //location
  12.   cout << "Enter element's location";
  13.           cin >>el>>col;
  14. //switch
  15.   switch(el)
  16.   {
  17.       case "a":zam=0; break;
  18.       case "b":zam=1; break;
  19.       case "c":zam=2; break;
  20.       case "d":zam=3; break;
  21.       case "e":zam=4; break;
  22.       case "f":zam=5; break;
  23.       case "g":zam=6; break;
  24.       case "h":zam=7; break;
  25.   }
  26. // Sam element
  27.   for (int i=0; i<8; i++)
  28.   {
  29.       for(int j=0; j<8;j++)
  30.       {
  31.           chess[i][j]=2;
  32.       }
  33.   }
  34.   for (i=0;i<8;i++)
  35.   {
  36.       for (j=0;j<8;j++)
  37.       {
  38.           cout << chess[i][j];
  39.       }
  40.       cout<<endl;
  41.   }
  42.     return 0;
  43. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top