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;
}
Answer:
When a pilot pushes the top of the right pedal, it activates the brakes on the right main wheel/wheels, and when the pilot pushes the top of the left rudder pedal, it activates the brake on the left main wheel/wheels. The brakes work in a rather simple way: they convert the kinetic energy of motion into heat energy.