Computers and Technology

A palindrome is a phrase that reads the same both forward and backward. Write a C++ program that reads a line from cin, prints its characters in reverse order on cout, and then pronounces judgement on whether the input line is a palindrome. Use the substr function within a loop to extract and print the characters one by one from the string, starting at the end of the string; at the same time, extract corresponding character starting at the beginning of the sting to compare with it. For example, here are two sample runs of the program: Enter string: able was I ere I saw elba
able was I ere I saw elba
is a palindrome.
Enter string: madam I'm adam
madam I'm adam
is not a palindrome.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 22:30, BilliePaul95
Janice usually works on a particular workbook that contains all business related data. she decides to keep a backup of all the data in a separate workbook. she opens a new workbook to transfer the data. which option should she use to copy all the data from one workbook to another workbook?
Answers: 1
image
Computers and Technology, 24.06.2019 04:30, LouieHBK
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe and
Answers: 1
image
Computers and Technology, 24.06.2019 14:30, thelordoftheknowwjo4
In a home that has 120 v service, there is an electric appliance that has a resistance of 12 ohms. how much power will this appliance consume? a. 10 w b. 120 w c 1200 w d. 1440 w
Answers: 1
image
Computers and Technology, 25.06.2019 08:10, ruslffdr
Memory aids that organize information for encoding are
Answers: 3
Do you know the correct answer?
A palindrome is a phrase that reads the same both forward and backward. Write a C++ program that rea...

Questions in other subjects:

Konu
Mathematics, 24.06.2019 00:00