/*-------
  Signature: say_sound2: string string -> int

  Purpose: expects an animal name and its desired animal
      sound, returns the length of that sound (how many
      characters are in the string representing that sound), 
      and has the side effect of printing that that animal 
      says that sound to the screen

  Examples:
      say_sound2("cow", "oink") == 4
      ...AND has the side effect of printing:
The cow says, "oink".
      ... to the screen.

      say_sound2("raccoon", "screech") == 7
      ...AND has the side effect of printing:
The raccoon says, "screech".
      ... to the screen.

  by: Sharon Tuttle
  last modified: 2016-11-04
--------*/

#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;

int say_sound2(string animal, string animal_sound)
{
    cout << ("The " + animal + " says, \""
            + animal_sound + "\".") << endl;

    return animal_sound.length();
}