I am self-studying C++ and the book \"Programming-Principles and Practices Using C++\" by Bjarne Stroustrup. One of the \"Try This\" asks this:
Implement square() wi
int square(int x) { int result = 0; for (int counter = 0; counter < x; ++counter) result += x; return result; }