Question: Write a function plural(str, n) which returns a plural version of str when n is o or greater than 1. Complete the following file: plural.cpp

 Write a function plural(str, n) which returns a plural version ofstr when n is o or greater than 1. Complete the followingfile: plural.cpp 1 2 #include using namespace std; #include "plural.h" 3 4

Write a function plural(str, n) which returns a plural version of str when n is o or greater than 1. Complete the following file: plural.cpp 1 2 #include using namespace std; #include "plural.h" 3 4 5 std::string plural(const std::string& s, int n) {l 6 7 8 9 10 Tester.cpp #include using namespace std; #include "plural.h" int main() { cout /** Returns a plural string based on the quantity @param s the string to "pluralize" @param n the quantity @return the unchanged string if n is 1, add "S" */ std::string plural (const std::string& s, int n); otherwise. #endif

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!