Q:

Write a script that will prompt the user for a string and then print whether it was empty or not

0

 Write a script that will prompt the user for a string and then print whether it was empty or not. 

All Answers

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

Ch4Ex27.m

instring = input('Enter a string: ', 's');

if isempty(instring)

 fprintf('Not much of a string there!\n')

else

 fprintf('Thanks!\n')

end

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