Formatting of Inputs/Outputs Flashcards
1
Q
format short
A
4 digits after decimal, default format
2
Q
format long
A
14 digits after decimal
3
Q
format short e
A
5 digits plus exponent
4
Q
format short g
A
5 total digits with or without exponent
5
Q
format bank
A
dollars and cents format
6
Q
format hex
A
hexadecimal display of bits
7
Q
format rat
A
approximate ratio of small integers
8
Q
format compact
A
suppress extra line feeds
9
Q
format loose
A
restore extra line feeds
10
Q
format +
A
only signs are printed
11
Q
fprintf
A
writes data in user specified format, or displays data in command window
fprintf(format_string, variables)
% indicates where array is inserted into string, followed by conversion characters
12
Q
%f
A
fixed point notation
13
Q
%e
A
exponential notation
14
Q
%d
A
decimal notation
15
Q
%g
A
shortest form, %f or %e