please elaborate these conditions in this program
1.) while(col<=row)
{
cout<<1;
col=col+1
2.) while(cole<=row-2)
{
cout<<0;
col=col_1;
how do these two conditons are putting 0 digits in the middle and 1 at the first and last digit
please elaborate these conditions in this program
1.) while(col<=row)
{
cout<<1;
col=col+1
2.) while(cole<=row-2)
{
cout<<0;
col=col_1;
how do these two conditons are putting 0 digits in the middle and 1 at the first and last digit
@Anku47 the program is split into two parts if row is odd your first condition gets executed all 1s , now if row even 1 displayed first then row-2 times 0s and then again 1 (second condition).
i hope its clear if yes dont forget to hit like and mark resolved 
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.