Computers and Technology
Computers and Technology, 21.02.2020 23:08, oreonb11

C++
a. Write a program that uses the function isPalindrome given in example 6-6 (Palindrome). Test your program on the followinng strings: "madam", "abba", "22", "67876", "444244", and "trymeuemyrt"

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

Example 6-6:
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;
}

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:20, khenalilovespandas
Number of megabytes of ram in a computer. qualitative or quantitative? because
Answers: 3
image
Computers and Technology, 23.06.2019 13:30, small77
Font size, font style, and are all aspects of character formatting.
Answers: 2
image
Computers and Technology, 23.06.2019 13:30, jhitotw
What is the primary difference between the header section of a document and the body? a. the body is displayed on the webpage and the header is not. b. the header is displayed on the webpage and the body is not. c. the tag for the body is self-closing, but the tags for the headers must be closed. d. the tag for the header is self closing, but the tag for the body must be closed.
Answers: 3
image
Computers and Technology, 23.06.2019 23:30, yasarhan2
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
Do you know the correct answer?
C++
a. Write a program that uses the function isPalindrome given in example 6-6 (Palindrome)....

Questions in other subjects:

Konu
Chemistry, 02.07.2020 01:01