Q:

Write a script that will prompt the user for a character, and will print it twice; once left-justified in a field width of 5, and again rightjustified in a field width of 3

0

 Write a script that will prompt the user for a character, and will print it twice; once left-justified in a field width of 5, and again rightjustified in a field width of 3.

All Answers

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

Ch3Ex11.m

mych = input('Enter a character: ', 's');

fprintf('Here it is: %-5c and again: %3c\n',mych,mych)

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