#Variable formatting in printf
1 messages · Page 1 of 1 (latest)
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
its just a string. put a variable in it
printf("%" + varLength + "s", "Hello")
before we misunderstand each other again, how about u show some concrete input/output examples of what u want
you need a variable betwee % and d, like Zabu said
or % and s
depending on what you output
Are you looking to repeat the numbers or are you looking for that exact output?
Closed the thread due to inactivity.
If your question was not resolved yet, feel free to just post a message to reopen it, or create a new thread. But try to improve the quality of your question to make it easier to help you 👍