Problem in printing spaces
Hi prikshit conditions are missing from your code
int stars=n/2;
int space=0;
int stars1=n/2;
int i=1;
while(i<=n)
{
int j=0;
while(j<=stars)
{
cout<<""<<" β; //stars
j++;
}
int k=1;
while(k<space)
{
cout<<β β<<β β;
k++;
}
int l=1;
while(l<=stars1)
{
cout<<β"<<" ";
l++;
}
then some more if-else conditions are to be added and according to that conditions stars will be added or substracted and same goes with spaces.
if you still canβt think of those conditions you can further ask