
Saqib H. answered 03/29/20
PhD in Computer Science with expertise in Python
It is pretty straight forward. The above code can be updated as below:
int main() {
cout << "Testing started" << endl;
cout << "2, expecting 8, got: " << CubeNum(2) << endl;
cout << "3, expecting 27, got: " << CubeNum(3) << endl;
cout << "-1, expecting -1, got: " << CubeNum(-1) << endl;
cout << "Testing completed" << endl;
return 0;
}