I don't have the right to use more than 25 lines for a function. One of my function has just 26 lines so I want to simplified it.
char *name(int big, int small, int nb, char *tab)
{
while (big < nb)
{
small = 1;
while (small < nb)
{
....
printf("here are the other lines\n");
....
small++;
}
big++;
}
return (tab);
}
big and small are initialize at 1. How could I include the small++ and big++ in the while condition?
I tried while (big++ && big < nb), it doesn't work why ?
The only way I just found is while ((big = big + 1) && big < nb)
Does anyone can explain why the first way doesn't work and if you have another solution ?
Thanks
while (big++ < nb)?smallas a parameter if you just change its value every iteration of the outer loop?forloop:for (int small = 1; small < nb; ++small) { ... }while (small+ < nb).smalltwice, the second time without a type.