basic caculation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>

int dn (int x, int y)
{
    return x * 2 + y;
}

int main ()
{
    using namespace std;
    int x;
    int y;
    y = 10;
    cin >> x;
    cout << dn (x + y) << endl;
}

I don't think i 'need' two functions per se

basicly I would like to know what is wrong with the code as it will not compile. 
x,y not x+y.
thanks :)
Topic archived. No new replies allowed.