1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
SCORPION-xisa [38]
3 years ago
9

Write a program that uses the function isPalindrome given in Example 6-6 (Palindrome). Test your program on the following string

s:
madam, abba, 22, 67876, 444244, trymeuemyrt

Modify the function isPalindrome of Example 6-6 so that when determining whether a string is a palindrome, cases are ignored, that is, uppercase and lowercase letters are considered the same.

The isPalindrome function from Example 6-6 has been included below for your convenience.

bool isPalindrome(string str)
{
int length = str.length();
for (int i = 0; i < length / 2; i++) {
if (str[i] != str[length – 1 – i]) {
return false;
} // if
} // for loop
return true;
}// isPalindrome

Your program should print a message indicating if a string is a palindrome:

madam is a palindrome
Computers and Technology
1 answer:
WITCHER [35]3 years ago
3 0

Answer:

Explanation:

bool isPalindrome(string str)

{

   int length = str.length();

   for (int i = 0; i < length / 2; i++) {

      if (str [i] != str [length – 1 – i]) {

         return false;

         }

    }

cout << str << "is a palindrome";

return true;

}

You might be interested in
After reading passage “the incredible machine” why do you think the article has been titled so?
Vitek1552 [10]
I haven’t read it, but just by the title it was probably talking about an incredible machine that was new to people.
7 0
3 years ago
List two ways to insert a chart in powerpoint
Zanzabum

Answer:

1st way: On the Insert tab, in the Illustrations group, click Chart. In the Insert Chart dialog box, click a chart, and then click OK.

2nd way: Click INSERT > Chart. Click the chart type and then double-click the chart you want.

3 0
3 years ago
Natural language generation is focused on?
Mila [183]

While natural language understanding focuses on computer reading comprehension, natural language generation enables computers to write. NLG is the process of producing a human language text response based on some data input. This text can also be converted into a speech format through text-to-speech services.

<em>-</em><em> </em><em>BRAINLIEST</em><em> answerer</em>

6 0
3 years ago
K
ollegr [7]
True??????????????????????????
7 0
4 years ago
Read 2 more answers
What is the name of the popular DBMS (database management system) that is open source and is distributed under the General Publi
Alex_Xolod [135]

Answer:

I looked it up on google and it said that one of the most popular ones is MySQL.

Explanation:

I don't know if it's right. I just looked it up on google.

6 0
3 years ago
Other questions:
  • A(n) ______ database stores data in tables that consist of rows and columns.
    5·2 answers
  • Determine whether the relation represents a function. If it is a​ function, state the domain and range.
    6·1 answer
  • What is the difference between a switch and a hub?
    8·1 answer
  • True or false for a given set of input values, a nand
    7·1 answer
  • Which feature should be used prior to finalizing a presentation to ensure that audience members with disabilities will be able t
    13·2 answers
  • Which XXX will prompt the user to enter a value greater than 10, until a value that is greater than 10 is actually input?
    14·1 answer
  • Give one advantage of saving file in the same folder<br>​
    13·2 answers
  • How can aspiring illustrators hone their skills?
    13·1 answer
  • All Office programs have similar commands on the tab for changing the document view a. File b. View c. Locate d. display ​
    5·1 answer
  • True or false. A plug-in card is always required to support pc sound
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!