Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ LANGUAGE /** * Given an input string, count the number of words ending * in 'y' or 'z' -so the 'y' in heavy and

C++ LANGUAGE

/**

* Given an input string, count the number of words ending

* in 'y' or 'z' -so the 'y' in "heavy" and the 'z' in "fez"

* count, but not the 'y' in "yellow". Make sure that your

* comparison is not case sensitive. We'll say that a y

* or z is at the end of a word if there is not an alphabetic

* letter immediately following it.

*

* Do not use any string functions except for substr(),

* at(), and size(). You may use isalpha from cctype as well.

*

*

* Here are some other examples:

* - "fez day" -> 2

* - "day fez" -> 2

* - "day fyyyz" -> 2

*/

int endzy(const string& str)

{

int result;

// Your code goes here

return result;

}

I WILL VOTE THUMB IF ALL PASS

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions