Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Programming Challange
- clc;clear;close all;
- usr_input=input("What string would you like to reverse?\n","s");
- q=1;
- for n=length(usr_input):-1:1
- rev(q)=usr_input(n);
- q=q+1;
- end
- fprintf("The reverse of %s is %s.\n",usr_input,rev);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement