Print Conversion Specifiers

Hi ,
Is it possible to apply Print Conversion Specifiers to a single value multiple .
simply put ,

printf("%.1s%6lf\n", perimeter_Circle);
I want one digit precision and 7 tab space on this item.

thx.
No. If you don't think it will work the way you want with a single specifier, use sprintf() to format the output to a string, then print the string with printf().

I don't think you should have to do that, though. Why doesn't

printf( "%*.1f\n", 7*TAB_SIZE, perimeter_Circle );

do the job?

BTW, "lf" is not a valid specifier. For float and double, use "f". If you are using long double, use "Lf".

Hope this helps.
Topic archived. No new replies allowed.