`Hey,
Note: If you have any queries related to the answer please do comment. I would be very happy to resolve all your queries.
clc
clear all
close all
format long
s=input('Enter any phrase: ','s');
ss=split(string(s));
ns=[];
for i=1:length(ss)-1
s1=char(ss(i));
ns=[ns,s1(end:-1:1),' '];
end
i=length(ss);
s1=char(ss(i));
ns=[ns,s1(end:-1:1)];
fprintf('Adjusted phrase: %s\n',ns);
Kindly revert for any queries
Thanks.
COP2271 MATLAB Module 09 Activities Activity C Given a sentence/phrase, reverse all letters and punctuation in...
Palindrome Detector C++ A palindrome is any word, phrase, or sentence that reads the same forward and backward. Here are some well-known palindromes: Able was I, ere I saw Elba A man, a plan, a canal, Panama Desserts, I stressed Kayak Write a program that determine whether an input string is a palindrome or not. Input: The program should prompt the user "Please enter a string to test for palindrome or type QUIT to exit: " and then wait for...