Programming Exercise 6-1 YE d f ? CENGAGE MINDTAP Ⓡ Tasks Code Pattern Complete Uses function 'isPalindrome' Code Pattern Incomplete Tested isPalindrome with the "Madam" string argument Description Searched your code for a specific pattern: .+*isPalindrome\(\"Madam\"\).+* You can learn more about regular expressions here. Code Pattern Incomplete Tested tsPalindrome with the "abBa" string argument Description Searched your code for a specific pattern: Run Checks Submit 0% > V main.cpp 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 string str; //Prompt the user to enter the string cout <<"Enter the string: "; //Get the input string cin >> str; //Iterate through the characters in a string for each (str.begin(), str.end(), [] (char & ch) { + //Convert the letter into lower-case ch:tolower(ch); }); //Assign the value returned from the function call bool sisPalindrome (str); //Check if the value is true if (s == true) //Print the message cout << str <<" is a palindrome"; //otherwise else //Print the message cout << str <<" is not a palindrome"; > Terminal Q Search this course + main.cpp: In function 'bool ispal indrome (std::__cxx11::string)': main.cpp:18:17: error: expected p rimary-expression before !=' tok if (str[m])!= str[len - 1 - m]) /bin/bash: line 4: ./a.out: No su Ich file or directory en X V

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter10: Application Development
Section: Chapter Questions
Problem 15VE
icon
Related questions
Question
MindTap - Cengage Learning - Microsoft Edge
https://ng.cengage.com/static/nb/ui/evo/index.html?deploymentid=57811235846758605217306036&eISBN=9781337274715&id=710937854&snapshotid=15895508
»
O
U
Programming Exercise 6-1
E
CENGAGE MINDTAP
5
Tasks
Code Pattern. Complete
Uses function `isPalindrome'
Code Pattern Incomplete
Tested isPalindrome with the
"Madam" string argument
Description
Searched your code for a specific
pattern:
.+*isPalindrome\(\"Madam\"\).+*
You can learn more about regular
expressions here.
Code Pattern Incomplete
Tested isPalindrome with the
"abBa" string argument
Description
Searched your code for a specific
pattern:
Type here to search
Run Checks
Submit 0%
9:
main.cpp
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Answered: Here are...
string str;
//Prompt the user to enter the string
cout <<"Enter the string: ";
//Get the input string
cin >> str;
//Iterate through the characters in a string
for_each (str.begin(), str.end(), [] (char & ch) {
//Convert the letter into lower-case
ch=::tolower (ch);
});
+
//Assign the value returned from the function call
bool sisPalindrome (str);
//Check if the value is true
if (s ==
true)
//Print the message
cout << str <<" is a palindrome";
//Otherwise
else
//Print the message
cout << str <<" is not a palindrome";
MindTap - Cengag...
Programming Exerc...
+
main.cpp: In function 'bool ispal
indrome (std::__cxx11::string)':
main.cpp:18:17: error: expected p
rimary-expression before !=' tok
if (str[m]) != str[len - 1 -
m])
/bin/bash: line 4: ./a.out: No su
ch file or directory
> Terminal
Q Search this course
en
40
X
8:11 PM
4/9/2020
?
A-Z
«
bongo
www
Transcribed Image Text:MindTap - Cengage Learning - Microsoft Edge https://ng.cengage.com/static/nb/ui/evo/index.html?deploymentid=57811235846758605217306036&eISBN=9781337274715&id=710937854&snapshotid=15895508 » O U Programming Exercise 6-1 E CENGAGE MINDTAP 5 Tasks Code Pattern. Complete Uses function `isPalindrome' Code Pattern Incomplete Tested isPalindrome with the "Madam" string argument Description Searched your code for a specific pattern: .+*isPalindrome\(\"Madam\"\).+* You can learn more about regular expressions here. Code Pattern Incomplete Tested isPalindrome with the "abBa" string argument Description Searched your code for a specific pattern: Type here to search Run Checks Submit 0% 9: main.cpp 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Answered: Here are... string str; //Prompt the user to enter the string cout <<"Enter the string: "; //Get the input string cin >> str; //Iterate through the characters in a string for_each (str.begin(), str.end(), [] (char & ch) { //Convert the letter into lower-case ch=::tolower (ch); }); + //Assign the value returned from the function call bool sisPalindrome (str); //Check if the value is true if (s == true) //Print the message cout << str <<" is a palindrome"; //Otherwise else //Print the message cout << str <<" is not a palindrome"; MindTap - Cengag... Programming Exerc... + main.cpp: In function 'bool ispal indrome (std::__cxx11::string)': main.cpp:18:17: error: expected p rimary-expression before !=' tok if (str[m]) != str[len - 1 - m]) /bin/bash: line 4: ./a.out: No su ch file or directory > Terminal Q Search this course en 40 X 8:11 PM 4/9/2020 ? A-Z « bongo www
MindTap - Cengage Learning - Microsoft Edge
https://ng.cengage.com/static/nb/ui/evo/index.html?deploymentid=57811235846758605217306036&eISBN=9781337274715&id=710937854&snapshotid=15895508
»
O
HH
U
Programming Exercise 6-1
3
CENGAGE MINDTAP
5
Tasks
Code Pattern. Complete
Uses function `isPalindrome'
Code Pattern Incomplete
Tested isPalindrome with the
"Madam" string argument
Description
Searched your code for a specific
pattern:
.+*isPalindrome\(\"Madam\"\).+*
You can learn more about regular
expressions here.
Code Pattern Incomplete
Tested isPalindrome with the
"abBa" string argument
Description
Searched your code for a specific
pattern:
Type here to search
Run Checks
Submit 0%
9:
main.cpp
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Answered: Here are...
//Prompt the user to enter the string
cout <<"Enter the string: ";
//Get the input string
cin >> str;
//Iterate through the characters in a string
for_each (str.begin(), str.end(), [] (char & ch) {
//Convert the letter into lower-case
ch::tolower(ch);
});
//Assign the value returned from the function call
bool sisPalindrome (str);
+
//Check if the value is true
if (s
true)
//Print the message
cout << str <<" is a palindrome";
==
//Otherwise
else
//Print the message
cout << str <<" is not a palindrome";
return 0;
MindTap - Cengag...
+
main.cpp: In function 'bool ispal
indrome (std::__cxx11::string)':
main.cpp:18:17: error: expected p
rimary-expression before !=' tok
if (str[m]) != str[len - 1 -
> Terminal
en
Q Search this course
m])
/bin/bash: line 4: ./a.out: No su
ch file or directory
X
7:57 PM
4/9/2020
?
A-Z
«
bongo
www
1
Transcribed Image Text:MindTap - Cengage Learning - Microsoft Edge https://ng.cengage.com/static/nb/ui/evo/index.html?deploymentid=57811235846758605217306036&eISBN=9781337274715&id=710937854&snapshotid=15895508 » O HH U Programming Exercise 6-1 3 CENGAGE MINDTAP 5 Tasks Code Pattern. Complete Uses function `isPalindrome' Code Pattern Incomplete Tested isPalindrome with the "Madam" string argument Description Searched your code for a specific pattern: .+*isPalindrome\(\"Madam\"\).+* You can learn more about regular expressions here. Code Pattern Incomplete Tested isPalindrome with the "abBa" string argument Description Searched your code for a specific pattern: Type here to search Run Checks Submit 0% 9: main.cpp 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 Answered: Here are... //Prompt the user to enter the string cout <<"Enter the string: "; //Get the input string cin >> str; //Iterate through the characters in a string for_each (str.begin(), str.end(), [] (char & ch) { //Convert the letter into lower-case ch::tolower(ch); }); //Assign the value returned from the function call bool sisPalindrome (str); + //Check if the value is true if (s true) //Print the message cout << str <<" is a palindrome"; == //Otherwise else //Print the message cout << str <<" is not a palindrome"; return 0; MindTap - Cengag... + main.cpp: In function 'bool ispal indrome (std::__cxx11::string)': main.cpp:18:17: error: expected p rimary-expression before !=' tok if (str[m]) != str[len - 1 - > Terminal en Q Search this course m]) /bin/bash: line 4: ./a.out: No su ch file or directory X 7:57 PM 4/9/2020 ? A-Z « bongo www 1
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning