How so?
hmm yea i guess could of done that i just had a stream of consciousness thing going here.
is there any consequences from doing that?
Initially when memory used to be low... you can understand.
Now, if you use to many variables in big programs.. Think about the wasted space.
It is good practice to use less variables.
You just needed 2 global variables to act as parameters for your functions.
Then pass then to the functions defined.
When the code is compiled 6 int means 6 different memory address. 2 means just two.
As for object oriented, the more modules the better is the program.
Main should be used only for calling various functions/methods
let's say you needed to add more shapes.. Changing main is not the proper way.
You could just define a new function and then add a choice.
Yes, right now it is trivial, but again you're just learning. Better learn the better ways. In bigger programs you will find that making small parts and joining them seems to work better.