Question: Lab Assignment 1 C + + PROBLEM 1 Write a function called missmess that has a string parameter, w . If w starts with '

Lab Assignment 1 C++
PROBLEM 1
Write a function called missmess that has a string parameter, w. If w starts with 'm' the function prints 'miss'. If w ends with 's', the function prints 'mess'. If both conditions are true (w starts with 'm' and ends with 's'), the function prints 'missmess'. Otherwise, the function prints the original value of w.
Examples of what the function should print, for different values of w :
\table[[w,output],[friend,friend],[failures,mess],[jazz,jazz],[miss,missmess],[mine,miss],[money,miss],[mints,missmess]]
Write a main program where you call the function repeatedly to check that it returns the right output for the inputs in the table above.
 Lab Assignment 1 C++ PROBLEM 1 Write a function called missmess

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!