Four-function and exponentiation console calculator This code works as it is supposed to:

#include&lt;iostream&gt;
#include&lt;cmath&gt;
#include&lt;cstdlib&gt;

using namespace std;

int main()
{
    char cAgain, type;
    int x, y=0;
    double addition(double num1, double num2), subtraction(double num1, double num2), division(double num1, double num2), 
        multiplication(double num1, double num2), exponential(double num1, double num2), num1, num2, total;
    do
    {
        cout &lt;&lt; "How many operations would you like to do?" &lt;&lt; endl;
        cin &gt;&gt; x;
        if (x &lt;= 0)
        {
            cout &lt;&lt; "Error: You must have 1 or more operations." &lt;&lt; endl;
        }
        else
        {
            while (x != 0, x--)
            {
                y++;
                cout &lt;&lt; "Enter in your "&lt;&lt;y&lt;&lt; " operation. (First Number (+,-,*,/,^) Second Number)" &lt;&lt; endl;
                cin &gt;&gt; num1 &gt;&gt; type &gt;&gt; num2;
                switch (type)
                {
                case '+':
                    total = addition(num1, num2);
                    cout &lt;&lt; num1 &lt;&lt; " + " &lt;&lt; num2 &lt;&lt; "= " &lt;&lt; total&lt;&lt; endl;
                    break;
                case'-':
                    total = subtraction(num1, num2);
                    cout &lt;&lt; num1 &lt;&lt; " - " &lt;&lt; num2 &lt;&lt; "= " &lt;&lt; total&lt;&lt; endl;
                    break;
                case'/':
                    total = division(num1, num2);
                    cout &lt;&lt; num1 &lt;&lt; " / " &lt;&lt; num2 &lt;&lt; "= " &lt;&lt; total&lt;&lt; endl;
                    break;
                case'*':
                    total = multiplication(num1, num2);
                    cout &lt;&lt; num1 &lt;&lt; " * " &lt;&lt; num2 &lt;&lt; "= " &lt;&lt; total &lt;&lt; endl;
                    break;
                case'^':
                    total = exponential(num1, num2);
                    cout &lt;&lt; num1 &lt;&lt; " ^ " &lt;&lt; num2 &lt;&lt; "= " &lt;&lt; total &lt;&lt; endl;
                    break;
                }
            }
        }
        cout &lt;&lt; "Would you like to run the program again.(Y/N)" &lt;&lt; endl;
            cin &gt;&gt; cAgain;
    } while (cAgain == 'Y' || cAgain == 'y');
return 0;
}

double addition(double num1, double num2)
{
    double total;
    total = num1 + num2;
    return (total);
}
double subtraction(double num1, double num2)
{
    double total;
    total = num1 - num2;
    return (total);
}
double division(double num1, double num2)
{
    double total;
    total = num1 / num2;
    return (total);
}
double multiplication(double num1, double num2)
{
    double total;
    total = num1 * num2;
    return (total);
}
double exponential(double num1, double num2)
{
    double total;
    total = pow(num1,num2);
    return (total);
}


It starts by asking for the number of operations to perform. You enter a number, such as 3. Then it asks you to enter in your operation, such as 5+5, which is 10. Then it asks for a second, such as 10^2, which is 100. Then it asks for a third, such as 100-10, which is 90. Then it asks if you'd like to start over.
I'll mention some additional points that haven't been mentioned yet, but this does look like it can still be cleaned out quite a bit.


You could define those functions above main() so that prototypes won't be needed.  Otherwise, put them above main(), as already mentioned in another answer.
These:


#include&lt;iostream&gt;
#include&lt;cmath&gt;
#include&lt;cstdlib&gt;



would look nicer with spaces:

#include &lt;iostream&gt;
#include &lt;cmath&gt;
#include &lt;cstdlib&gt;


Regarding spacing, you have some inconsistent spacing around the cases.  Try not to neglect this as it could make your code more awkward to read for others.
type, x, and y are all declared outside of the loop, but are only used inside of the loop.  In order to help keep track of them, declare them right where they're first used.  Doing this with every variable can help with maintaining cleaner code, especially with larger programs.
This is not doing what you expect:


while (x != 0, x--)



The comma operator returns the result of the last expression, which is the x--. The other expressions are evaluated (from left to right) but the results of the expression are ignored.  Thus, the result of x != 0 is evaluated with no side affects and the result dropped. This makes the expression equivalent to while (x--).
You don't check for division by 0, so your program can break if this operation is done.  You may throw an exception for that and handle it, so that you can get a different input.  Just make sure this division doesn't happen.
You don't need return 0 at the end of main().  The compiler will do this return for you after reaching this point.