(1) Put both main() functions into a new file.
(2) Rename both main() functions to something appropriate.
(3) Write a new main() function to call the two functions in whatever order you see fit.
Saswat is talking about this line of code:
This is wrong. I don't know where you got the idea that you should include the function name in a return statement. A return statement should return no value at all, i.e.
OR should return some suitable value:
int func() // returns an integer
// ...some code that calculates x...
A return statement isn't necessary at the end of a function as the function will return once it hits the closing brace anyway:
// ...some code...
return; // this line is pointless
// (unless it was a conditional return, and you have more code here)