Q:

Write a script called echostring that will prompt the user for a string, and will echo print the string in quotes:

0

Write a script called echostring that will prompt the user for a string, and will echo print the string in quotes: 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

>> echostring

Enter your string: hi there

Your string was: 'hi there'

echostring.m

% Prompt the user and print a string in quotes

str = input('Enter your string: ', 's');

fprintf('Your string was: ''%s''\n',str)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now