You can use the input
function to get the value entered from the keyboard and then use the swapcase
function to swap the case of characters. Here's the code:
main.m165 chars4 lines
In this code, 's'
as the second argument to the input
function is used to specify that the input should be read as a string. The swapcase
function swaps the case of characters and disp
function is used to display the swapped string.
gistlibby LogSnag