cs:c_language:printf_format
Return to Home page
If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at] skenz.it
You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url: https://www.skenz.it/cs/c_language/printf_format?do=diff&rev2%5B0%5D=&rev2%5B1%5D=1551188114&difftype=sidebyside
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | cs:c_language:printf_format [2024/04/08 22:35] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Printf format ====== | ||
+ | **Concepts: | ||
+ | Use of the function '' | ||
+ | **Text:**\\ | ||
+ | Given a '' | ||
+ | <file C> | ||
+ | float x = 12.12; | ||
+ | </ | ||
+ | Produce the following output: | ||
+ | < | ||
+ | 12.120000 | ||
+ | 12.120000 | ||
+ | | ||
+ | 12.12 | ||
+ | 12.12 | ||
+ | 0000012.12 | ||
+ | </ | ||
+ | |||
+ | |||
+ | **Solution: | ||
+ | <file C printf_format.c> | ||
+ | /* Example of Use of the function printf to format the output */ | ||
+ | |||
+ | #include < | ||
+ | |||
+ | |||
+ | int main(){ | ||
+ | float x = 12.12; | ||
+ | |||
+ | printf(" | ||
+ | printf(" | ||
+ | printf(" | ||
+ | printf(" | ||
+ | printf(" | ||
+ | printf(" | ||
+ | |||
+ | return 0; | ||
+ | } | ||
+ | </ |
If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at] skenz.it
You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url: https://www.skenz.it/cs/c_language/printf_format?do=diff&rev2%5B0%5D=&rev2%5B1%5D=1551188114&difftype=sidebyside
/web/htdocs/www.skenz.it/home/data/pages/cs/c_language/printf_format.txt · Last modified: 2024/04/08 22:35 by 127.0.0.1