Q:

A script iotrace has been written. Here’s what the desired output looks like:

0

A script iotrace has been written. Here’s what the desired output looks like:

 >> iotrace

Please enter a number: 33

Please enter a character: x

Your number is 33.00

Your char is x!

Fix this script so that it works as shown above:

All Answers

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

iotrace.m

mynum = input('Please enter a number:\n ');

mychar = input('Please enter a character: ', 's');

fprintf('Your number is %.2f\n', mynum)

fprintf('Your char is %6c!\n', mychar)

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