2021-04-18 21:39:05 +00:00

516 B

String Formatting

Here are some basic argument specifiers you should know:

%s - String (or any object with a string representation, like numbers)

%d - Integers

%f - Floating point numbers

%.f - Floating point numbers with a fixed amount of digits to the right of the dot.

%x/%X - Integers in hex representation (lowercase/uppercase)

Exercise

You will need to write a format string which prints out the data using: the following syntax: Hello John Doe. Your current balance is $53.44