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
MAXImum [283]
3 years ago
13

Write a program that uses the function isPalindrome given below. Test your program on the following strings: madam, abba, 22, 67

876, 444244, trymeuemyrt. Modify the function isPalindrome given so that when determining whether a string is a palindrome, cases are ignored, that is, uppercase and lowercase letters are considered the same. 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;
}

return true;
}
Engineering
1 answer:
defon3 years ago
5 0

Answer:

#include <iostream>

#include <string>

using namespace std;

bool isPalindrome(string str)

{

   int length = str.length();

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

   {

       if (tolower(str[i]) != tolower(str[length - 1 - i]))

           return false;

   }

   return true;

}

int main()

{

   string s[6] = {"madam", "abba", "22", "67876", "444244", "trymeuemyrt"};

   int i;

   for(i=0; i<6; i++)

   {

       //Testing function

       if(isPalindrome(s[i]))

       {

           cout << "\n " << s[i] << " is a palindrome... \n";

       }

       else

       {

           cout << "\n " << s[i] << " is not a palindrome... \n";

       }

   }    

       

   return 0;

}

You might be interested in
The coolant heat storage system:
Monica [59]

Answer:

c

Explanation:

This is because many things, such as pcs, over heat

8 0
3 years ago
A furniture manufacturer purchases a drill press machine enabled with 5G and edge computing capabilities to keep the machine ope
Andreas93 [3]

A lot of manufacturer often uses 5G machines. How these capabilities could help improve safety of the operators is that it does includes an emergency switch for the operator so that one can manually shut off when needed.

<h3>Edge computing with 5G</h3>

  • The edge computing along with 5G network and IoT devices can help put together  different safety features and limitations and on can use them to known the unsafe action and also data can be communicated.

Edge computing when use with 5G produces good opportunities in all industry. It is known to help bring computation and data storage close to where data is been produced and it enable good data control, reduced costs, etc.

Learn more about 5G network from

brainly.com/question/24664177

8 0
2 years ago
What is a radio wave made up of? Molecules? Electrons? Other?
mafiozo [28]

Radio waves are radiated by charged particles when they are accelerated. They are produced artificially by time-varying electric currents, consisting of electrons flowing back and forth in a specially-shaped metal conductor called an antenna. ... Radio waves are received by another antenna attached to a radio receiver.

4 0
3 years ago
Read 2 more answers
If an older multimeter is set to display its reading in megohms, what must you do to determine the correct value? Please help.
Gekata [30.6K]

Answer:

idk

Explanation:

8 0
3 years ago
When you multiply monomials with the same variables, you multiply the coefficients and add the exponents!
RideAnS [48]

Answer: ok

Explanation:

this isn't a question?

3 0
3 years ago
Other questions:
  • It is known that the connecting rod AB exerts on the crank BCa 2.5-kN force directed down andto the left along the centerline of
    12·1 answer
  • In case of damaged prestressed concrete I girders which are used for restoring strength?
    9·1 answer
  • Automobile engines normally have
    8·1 answer
  • You need to bake 2 dozen chocolate chip
    12·1 answer
  • A round bar of chromium steel, (ρ= 7833 kg/m, k =48.9 W/m-K, c =0.115 KJ/kg-K, α=3.91 ×10^-6 m^2/s) emerges from a heat treatmen
    14·1 answer
  • 1) Each of the following would be considered company-confidential except
    10·1 answer
  • You rent an apartment that costs $1800 per month during the first year, but the rent is set to go up 11,5% per year. What would
    12·1 answer
  • When a company in the United States employs people in India to answer their customer service calls this is an example of
    9·1 answer
  • I) A sag vertical curve is to be designed to join a 4% grade to a 2% grade. If the design
    6·1 answer
  • The ______ number of a flow is defined as the ratio of the speed of flow to the speed of sound in the flowing fluid.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!