Practice --------- problem 1: int array2D[MAX][MAX]; int Index(int r, int c, int numberOfColumns) { return c + numberOfColumns * r; } for(int r = 0; r < MAX; r++) { for(int c = 0; c < MAX; c++) { array[Index(r,c)] = r*c; cout << “ } } problem 2: typedef int (*ArithmeticFcn)(int, int); ArithmeticFcn GetArithmeticFcn(char op); int Add(int x, int y); int Sub(int x, int y); int Mul(int x, int y); int Div(int x, int y); int main() { char ops[] = {'+', '-', '*', '/'}; int x1 = 0; int x2 = 0; char op; cout << "Please input the 2 operands with a space between: "; cin >> x1 >> x2; cout << "Please input the op code: "; cin >> op; ArithmeticFcn OpFcn = GetArithmeticFcn(op); cout << x1 << " " << op << " " << x2 << " = " << OpFcn(x1, x2) << endl; } int Add(int x, int y) { return x + y; } int Sub(int x, int y) { return x - y; } int Mul(int x, int y) { return x * y; } int Div(int x, int y) { return x / y; } ArithmeticFcn GetArithmeticFcn(char op) { switch (op) { default: // default will be to add case '+': return Add; case '-': return Sub; case '*': return Mul; case '/': return Div; } }