You can try:
for (x=10 ; x > 0 ; x--) {
if (x < prev) {
Format = "%" x + 1 "d";
printf Format, x;
}
prev = x
}
The idea is to build the Format string outside of the printf command ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.