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
What is your favorite anime ( All movies and episodes related to them count )
Citrus2011 [14]

Answer:

B. Naruto

Explanation:

7 0
3 years ago
Read 2 more answers
An object reference is required for the nonstatic field method or property True or False
Marizza181 [45]
I believe its false.
6 0
3 years ago
What was the first edition of the internet?
belka [17]

The first workable prototype of the internet came in the late 1960s

7 0
3 years ago
Write a c program to print the sum of cubes of odd numbers between 1 to 100​
garik1379 [7]

Answer:

   int sum = 0;

   for (int i = 1; i < 100; i += 2) {

       sum += i * i;

   }

   printf("The sum of cubes is %d", sum);

   /* Prints: The sum of cubes is 166650 */

Explanation:

If 1 should be excluded, let the for loop start at 3.

4 0
3 years ago
Which mechanism will move a port into a root-inconsistent state if bpdus coming from a certain direction indicate another switch
erma4kov [3.2K]

A root guard is seen as the  mechanism will move a port into a root-inconsistent state if bpdus coming from a certain direction indicate another switch is trying to become the root bridge.

<h3>What is Root guard?</h3>

Root guard is known to be a term that pertains to the family of STP feature and it is one that is enabled only on a port-by-port basis.

Note that  it hinders a configured port from changing to a root port and as such, a root guard is seen as the  mechanism will move a port into a root-inconsistent state if bpdus coming from a certain direction indicate another switch is trying to become the root bridge.

Learn more about root guard from

brainly.com/question/27780486

#SPJ1

4 0
2 years ago
Other questions:
  • When federal courts are evaluating digital evidence from computer-generated records, what exception is applied to hearsay?'
    13·1 answer
  • What is the bandwidth-delay product for a 50 Mbps channel on a geostationary satellite (assume a RTT of 540 ms)? If the packets
    5·1 answer
  • What does subscribing to a website’s RSS feed provide to a subscriber?
    10·1 answer
  • At the Network layer, what type of address is used to identify the receiving host?
    10·1 answer
  • Craig wants to create a computing infrastructure that will allow developers within his company to build applications on a primar
    9·1 answer
  • What is a record? What is a field? How are they represented in Access?
    8·1 answer
  • Write a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The user shoul
    13·1 answer
  • If you convinced your teacher to give you an extension on an assignment, what would this situation be an example of? OA. General
    8·1 answer
  • Which of the following is an example of metadata about a webpage?
    7·2 answers
  • Yeoo check dis out!!!!!! wait my full vid dont show hol on
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!