Please help a confused newbie?
<p>So, I've just started learning c++ yesterday and I'm really confused with this piece of code.</p>

<pre><code>#include &lt;iostream&gt;

int ReadNumber()
{
    using namespace std;
    cout &lt;&lt; "Enter a number: ";
    int x;
    cin &gt;&gt; x;
    return x;
}

void WriteAnswer(int x)
{
    using namespace std;
    cout &lt;&lt; "The answer is " &lt;&lt; x &lt;&lt; endl;
}

int main()
{
    int x = ReadNumber();
    int y = ReadNumber();
    WriteAnswer(x+y);
    return 0;
}
</code></pre>

<p>My question is, why does he assign a function to a variable? What's the point in assigning int x, y to ReadNumber() ? Is it for storing return value of function in a variable? Or is this just a way to pass arguments?</p>
