C++ How to Program (10th Edition)
C++ How to Program (10th Edition)
10th Edition
ISBN: 9780134448237
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
Question
Book Icon
Chapter 16, Problem 16.13E
Program Plan Intro

Program Plan:

  • Include necessary header files.
  • Declare boolPalindromeTester(string s); function header which will accept a string and return a bool value.
  • Start main() function:
  • Declare string variable “ a ” and bool variable “ c ”.
  • Input string in “ a ”.
  • Call “PalindromeTester” function with argument as “ a ”.
  • Check if return of function is true, then display “string is palindrome” else display “String not a palindrome”.
  • Return and exit main function.
  • Define function boolPalindromeTester(string s).
  • Use transforn function to convert string s to lowercase.
  • Declare two strings “a” and “b”.
  • Use copy_if function to remove said punctuations and copy in new string “a”.
  • Make “b” same as “a”.
  • Use reverse() function on “b” to get reverse of string in “b”.
  • Make check bool value true.
  • Run loop from first string to end, comparing characters of both “a” and “b”. If mismatch is found return false.
  • If loop is fully executed, return true.
  • Blurred answer
    Students have asked these similar questions
    I need help creating the network diagram and then revising it for the modified activity times.
    Activity No. Activity Time (weeks) Immediate Predecessors 1 Requirements collection 3 2 Requirements structuring 4 1 3 Process analysis 3 2 4 Data analysis 3 2 5 Logical design 50 3,4 6 Physical design 5 5 7 Implementation 6 6 c. Using the information from part b, prepare a network diagram. Identify the critical path.
    Given the following Extended-BNF grammar of the basic mathematical expressions:  Show the derivation steps for the expression: ( 2 + 3 ) * 6 – 20 / ( 3 + 1 ) Draw the parsing tree of this expression. SEE IMAGE
    Knowledge Booster
    Background pattern image
    Similar questions
    SEE MORE QUESTIONS
    Recommended textbooks for you
    Text book image
    C++ Programming: From Problem Analysis to Program...
    Computer Science
    ISBN:9781337102087
    Author:D. S. Malik
    Publisher:Cengage Learning
    Text book image
    C++ for Engineers and Scientists
    Computer Science
    ISBN:9781133187844
    Author:Bronson, Gary J.
    Publisher:Course Technology Ptr
    Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,