31. Square of a Number

 Your task is to define both:

  • macro called SQUARE(x) that returns the square of x.
  • An inline function called square(int x) that also returns the square of x. 

In main(), the program will read an integer n and call both versions to print:

Macro Square: <result>
Inline Square: <result>

 

Example
 Input:

5

Output:

Macro Square: 25
Inline Square: 25

 

Input:

-3

Output:

Macro Square: 9
Inline Square: 9
Loading...

Input

5

Expected Output

Macro Square: 25 Inline Square: 25