Please send questions to
st10@humboldt.edu .
/*-----------------------------------------------
Contract: repeat3: string -> string
Purpose: return a new string that is <word> repeated
three times
Examples: for string greeting = "hello";
repeat3(greeting) == "hellohellohello"
by: Sharon M. Tuttle
last modified: 12-7-05
-------------------------------------------------*/
#include <string>
using namespace std;
string repeat3(string word)
{
// + works with standard string class instances;
// it concatenates, or joins, them
return word + word + word;
}