#include <iostream> using namespace std; namespace MathOps { int x = 10; int square(int n) { return n * n; } } int main() { using namespace MathOps; cout << "x=" << x << endl; cout << "Square=" << square(x) << endl; /* cout << "x=" << MathOps::x << endl; cout << "Square=" << MathOps::square(MathOps::x) << endl; */ return 0; }
Test Cases
Test Results
Input
Expected Output
x=10 Square=100