I don't understand how you think it will help organize my program |
Several reasons for using functions:
1) Anything you do more than once in your code, should be in a function. Consider your prompting for two numbers. You do that in four separate places in your code. Why not call one function that asks the user to enter two numbers? That way, you write the code once rather than 4 times. You only need to debug the function once, rather than four separate times.
A trivial example, but you should get the idea.
2) Code isolation. By creating four separate functions as
James2250 suggested, you isolate your logic for each operation. Much less chance of one operation interferring with a different operation.
3) Organization. By creating a function called "add_two_numbers", it's very easy for someone else to follow your program. It's immediately clear what the function does by it's name. Sure, you know what your program does at this point, but as it grows, you don't want to keep cramming everything into main.
As you advance in C++, use of functions will become mandatory, such as with classes.