SHARE
TWEET

KURWA ALE SIE Z TYM MECZYŁEM XD

a guest Oct 21st, 2019 117 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3. #define SIZE 15
  4.  
  5. int main()
  6. {
  7.     int a = SIZE, j, i, m = 0, k = 0;
  8.     char tab[SIZE][SIZE];
  9.     for (a; a > SIZE / 2; a -= 2)
  10.     {
  11.         for (i = m; i < a; i++)
  12.         {
  13.             for (j = k; j < a; j++)
  14.             {
  15.                 tab[i][j] = (i + a == SIZE || j + a == SIZE || j == a - 1 || i == a - 1) ? '*' : ' ';
  16.                 if ((i < SIZE / 2 && j < SIZE / 2) && (i - 1 == j&& i%2==1))
  17.                 {
  18.                     tab[i][j] = ' ';
  19.                 }
  20.                 else if ((i < SIZE / 2 && j < SIZE / 2) && i-1==j && i%2==0)
  21.                 {
  22.                 tab[i][j] = '*';
  23. }
  24.             }
  25.         }
  26.         m += 2;
  27.         k += 2;
  28. }
  29.     for (i = 0; i < SIZE; i++)
  30.     {
  31.         for (j = 0; j < SIZE; j++)
  32.         {
  33.             cout << tab[i][j] << ' ';
  34.         }
  35.         cout << endl;
  36.     }
  37. }
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