Inputs/outputs Flashcards
1
Q
Displaying statements on command line
A
Fprintf(‘message to print’)
2
Q
Prompting user for input
A
X=input(‘message to show’)
3
Q
Printing values to command line using printf function
Printing different formats to command line
A
Fprintf(‘message’)
Fprint(‘%d %s %x.yf’, whole number, string, floating point number)
X=number of values / space between the decimal point
Y=number of values after the decimal point
4
Q
Printing % sign or \ sign or ‘ sign using printf
A
Fprintf(‘%% \ ‘’) prints % \ ‘ at the command line