Electrical and Computer Engineering
3 of 30
UAH
CPE 112
Example C++ Program (continued)
•int Square(int n)
•{
• return n*n;
•}
•
•int Cube(int n)
•{
• return n*n*n;
•}
•
•The left brace({) and right brace (}) mark the beginning and end of the statements to be executed.