I tried to draw that shape but it doesnt work in right way .. any help?
example
for size = 3 print:
* *
***
* *
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int N, t,col,row;
cin >> t;
for (int i =0; i < t; i++)
{
cin >> N;
for (col = -N; col < N; col++){
for (row = -N; row < N; row++)
{
if (abs(row) >= abs(col))
cout << "*";
else
cout << " ";
}
cout << endl;
}
}
return 0;
}