So far we have used the "echo" statement to perform output to screen, this statement is rather limited since it will not allows us to format the output. In this page we will learn about the statement "printf" which gives us much more power.
The format string indicates how to represent the values that will be indicated later. The main advantage is that, besides formatting the output values, we can also insert text between them.
The format string may include a series of special characters that indicate how to format the variables included in the statement.
| Element | Type of variable |
| %s | String of characters. |
| %d | Number with no decimals. |
| %f | Number with decimals. |
| %c | ASCII Character. |
| lthough there are other types, these are the most important ones. | |