Input And Output Flashcards
1
Q
var1 = input('Enter a number: ') var2 = input('Enter a word: ', 's')
A
Displays the prompt and stores user input in var. ‘s’ must be used if input is a string.
2
Q
disp(‘input’)
A
Displays input without formatting.
3
Q
fprintf(‘string with placeholder’, input)
A
Formats a string with custom input. Placeholders include: %s for strings %c for single character %d for decimal integer %f for floating digit number