extended printf() example with gets()