I want to create a condition so that blank will not turn negative due to the blank -=1. For example if n = 3, blank = 1 therefore will print two "#", however I want it to stop at 0 when it loops
Here's my code
for (int blank = n-2; blank < n; blank -=1)
printf("#");
printf("\n");
something like this is what i'm trying to achieve
for (int blank = n-2; blank < n or blank > 0; blank -=1)
printf("#");
printf("\n");
or
for (int blank = n-2; blank < n; blank -=1)
printf("#");
{
if (blank == 0) break;
}
printf("\n");
thank you