Electrical and Computer Engineering
14
of 30
UAH
CPE 112
Example C++ Program (continued)
•
int
Square(
int
n)
•
{
•
return
n*n;
•
}
•
•
int
Cube(
int
n)
•
{
•
return
n*n*n;
•
}