Please write the code in c++ Write a function with one input parameter that is a...

90.2K

Verified Solution

Question

Programming

Please write the code in c++

Write a function with one input parameter that is a vector ofstrings. The function should count and return the number of stringsin the vector that have either an 'x' or a 'z' character inthem.

For example, when the function is called, if the vector argumentcontains the 6 string values, \"enter\", \"exit\", \"zebra\", \"tiger\",\"pizza\", \"zootaxy\" the function should return a count of 4.(\"exit\", \"zebra\", \"pizza\", and \"zootaxy\" all have an x and/or a zcharacter.)

You may assume all letters in the vector of strings arelowercase and that the vector can have a large number ofelements.

Answer & Explanation Solved by verified expert
4.5 Ratings (788 Votes)
input codeoutput 1codeinclude    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students