vendredi 28 février 2020

This loop is not ending once program starts running

Once my program starts running it is not stopping after few steps . can anyone help me with this

void main()
{
 int n,row,column,lim1,lim2,k;
 scanf("%d",&n);
 lim2=(2*n)-1;
 lim1=1;
 k=n;
 for(row=1,column=1;row<=lim2,column<=lim2;row++,column++)
 while((row||column=lim1)||(row||column=lim2))
{ printf("%d",k);
 n--;
 lim1=lim1+1;
 }

}```

Aucun commentaire:

Enregistrer un commentaire