I\'d like to do something like printf(\"?\", count, char) to repeat a character count times.
printf(\"?\", count, char)
count
What is the right format-string to accomplish
you can make a function that do this job and use it
#include void repeat (char input , int count ) { for (int i=0; i != count; i++ ) { printf("%c", input); } } int main() { repeat ('#', 5); return 0; }
This will output
#####