>I declared this as a global variable because I received an error stating that I had too few arguments and that 'a' and 'b' were undeclared. Which it is still doing now, i'm not sure how to resolve this issue.

Could you post the error message you get.
As a matter of fact there are a lot of things which need to be fixed in you code to get it working. I suggest that you break down the problem into parts and work on to get atleast one thing working and then you can start building on top of it.
To start with why don't you get then function squareCM working?

And to quickly point out squareCM takes two parameters and it gets called in main. The arguments you send from main are a,b. Which are not defined in the main scope. Why dont you declare those two variables in main and read values for those variables from user usinf scanf and pass it onto squareCM to calculate? Does that makes sense?

~H