output special characters and format
Special characters
Character sequence | Result |
\n | Moves cursor to next line (same effect as endl |
\t | Generates a tab character to move the cursor to the next tab stop |
\\ | Prints a backslash (\) |
\’ | Prints a single quotation mark (‘) |
\” | Prints a double quotation mark (“) |
Option | Description |
left | Left justifies the output |
right | Right justifies the output |
showpoint | Displays decimal point and trailing zeros for all floating point numbers, even if the decimal places are not needed |
uppercase | Desplays the “e” in E-notation as “E” rather than “e” |
showpos | Desplays a leading plus sign before positive values |
scientific | Displays floating point numbers in scientific (“E”) notation |
fixed | Displays floating point numbers in normal notation |
0 Comments:
Post a Comment
<< Home