We have already declared a namespace MathOps with:
x = 10;
square(int n)
n*n
Your task is to:
x
square(x)
Example
Output:
x=10 Square=100
Why this output?
Because the variable x is accessed with MathOps::x and the function is called with MathOps::square(10).
MathOps::square(10)
Question Significance
Demonstrates how to declare functions inside a namespace and call them.
Test Cases
Test Results
Input
Expected Output