Write a recursive function:

```
int sum( int x, int max )
{
/* complete the code */
}
```

that calculates the sum of the numbers from x to max (inclusive). For example, sum (4, 7) would compute 4 + 5 + 6 + 7 and return the value 22.

Note: The function must be recursive.